This is the start of the stable review cycle for the 4.9.142 release.
There are 92 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat Dec 1 14:00:37 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.142-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.142-rc1
Mimi Zohar <zohar(a)linux.vnet.ibm.com>
ima: re-initialize iint->atomic_flags
Dmitry Kasatkin <dmitry.kasatkin(a)gmail.com>
ima: re-introduce own integrity cache lock
Matthew Garrett <mjg59(a)google.com>
EVM: Add support for portable signature format
Mimi Zohar <zohar(a)linux.vnet.ibm.com>
ima: always measure and audit files in policy
Eric W. Biederman <ebiederm(a)xmission.com>
Revert "evm: Translate user/group ids relative to s_user_ns when computing HMAC"
Alexander Aring <aring(a)mojatatu.com>
net: ieee802154: 6lowpan: fix frag reassembly
Janosch Frank <frankja(a)linux.ibm.com>
s390/mm: Check for valid vma before zapping in gmap_discard
Phil Elwell <phil(a)raspberrypi.org>
lan78xx: Read MAC address from DT if present
Salvatore Mesoraca <s.mesoraca16(a)gmail.com>
namei: allow restricted O_CREAT of FIFOs and regular files
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
Aaron Ma <aaron.ma(a)canonical.com>
usb: xhci: fix uninitialized completion when USB3 port got wrong status
Greg Kroah-Hartman <greg(a)kroah.com>
tty: wipe buffer if not echoing data
Linus Torvalds <torvalds(a)linux-foundation.org>
tty: wipe buffer.
Sebastien Boisvert <sebhtml(a)videotron.qc.ca>
include/linux/pfn_t.h: force '~' to be parsed as an unary operator
Subhash Jadavani <subhashj(a)codeaurora.org>
scsi: ufshcd: release resources if probe fails
Subhash Jadavani <subhashj(a)codeaurora.org>
scsi: ufs: fix race between clock gating and devfreq scaling work
Venkat Gopalakrishnan <venkatg(a)codeaurora.org>
scsi: ufshcd: Fix race between clk scaling and ungate work
Yaniv Gardi <ygardi(a)codeaurora.org>
scsi: ufs: fix bugs related to null pointer access and array size
Karthik D A <karthida(a)marvell.com>
mwifiex: fix p2p device doesn't find in scan problem
Amitkumar Karwar <akarwar(a)marvell.com>
mwifiex: Fix NULL pointer dereference in skb_dequeue()
Amitkumar Karwar <akarwar(a)marvell.com>
mwifiex: report error to PCIe for suspend failure
Amitkumar Karwar <akarwar(a)marvell.com>
mwifiex: prevent register accesses after host is sleeping
Johannes Thumshirn <jthumshirn(a)suse.de>
cw1200: Don't leak memory if krealloc failes
Ramses Ramírez <ramzeto(a)gmail.com>
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Enno Boland <gottox(a)voidlinux.eu>
Input: xpad - fix GPD Win 2 controller name
Ethan Lee <flibitijibibo(a)gmail.com>
Input: xpad - add GPD Win 2 Controller USB IDs
Marcus Folkesson <marcus.folkesson(a)gmail.com>
Input: xpad - avoid using __set_bit() for capabilities
Leo Sperling <leosperling97(a)gmail.com>
Input: xpad - fix some coding style issues
Francis Therien <frtherien(a)gmail.com>
Input: xpad - add PDP device id 0x02a4
Mark Furneaux <mark(a)furneaux.ca>
Input: xpad - add support for PDP Xbox One controllers
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - validate USB endpoint type during probe
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix PowerA init quirk for some gamepad models
Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Input: xpad - constify usb_device_id
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with XBCD
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with 360Controller
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with xboxdrv
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sort supported devices by USB ID
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - support some quirky Xbox One pads
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - restore LED state after device resume
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix stuck mode button on Xbox One S pad
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - don't depend on endpoint order
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - simplify error condition in init_output
Daniel Tobias <dan.g.tob(a)gmail.com>
Input: xpad - move reporting xbox one home button to common function
Daniel Tobias <dan.g.tob(a)gmail.com>
Input: xpad - correctly sort vendor id's
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - add product ID for Xbox One S pad
Vasanthakumar Thiagarajan <vthiagar(a)qti.qualcomm.com>
ath10k: fix kernel panic due to race in accessing arvif list
Greg Hackmann <ghackmann(a)android.com>
arm64: remove no-op -p linker flag
Johan Hovold <johan(a)kernel.org>
net: bcmgenet: fix OF child-node lookup
Johan Hovold <johan(a)kernel.org>
NFC: nfcmrvl_uart: fix OF child-node lookup
Johan Hovold <johan(a)kernel.org>
of: add helper to lookup compatible child node
Yufen Yu <yuyufen(a)huawei.com>
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
efi/arm: Revert deferred unmap of early memmap mapping
Satheesh Rajendran <sathnaga(a)linux.vnet.ibm.com>
powerpc/numa: Suppress "VPHN is not supported" messages
Prarit Bhargava <prarit(a)redhat.com>
kdb: Use strscpy with destination buffer size
Trond Myklebust <trond.myklebust(a)hammerspace.com>
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: make lookup_processor_type() non-__init
Kan Liang <kan.liang(a)linux.intel.com>
perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/io: Fix the IO workarounds code to work with Radix
Jens Axboe <axboe(a)kernel.dk>
floppy: fix race condition in __floppy_read_block_0()
Xulin Sun <xulin.sun(a)windriver.com>
rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
Anson Huang <anson.huang(a)nxp.com>
cpufreq: imx6q: add return value check for voltage scale
Scott Wood <oss(a)buserror.net>
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
Jerome Brunet <jbrunet(a)baylibre.com>
pinctrl: meson: fix pinconf bias disable
Mathias Nyman <mathias.nyman(a)linux.intel.com>
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
Michael J. Ruhl <michael.j.ruhl(a)intel.com>
IB/hfi1: Eliminate races in the SDMA send error path
Alex Estrin <alex.estrin(a)intel.com>
IB/core: Fix for core panic
Erik Schmauss <erik.schmauss(a)intel.com>
ACPICA: AML interpreter: add region addresses in global list during initialization
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/ast: Remove existing framebuffers before loading driver
Y.C. Chen <yc_chen(a)aspeedtech.com>
drm/ast: fixed cursor may disappear sometimes
Y.C. Chen <yc_chen(a)aspeedtech.com>
drm/ast: change resolution may cause screen blurred
Dmitry Vyukov <dvyukov(a)google.com>
mm: don't warn about large allocations for slab
Eric Dumazet <edumazet(a)google.com>
llc: do not use sk_eat_skb()
Andrew Price <anprice(a)redhat.com>
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
Xin Long <lucien.xin(a)gmail.com>
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
bfs: add sanity check at bfs_fill_super()
Tetsuo Handa <penguin-kernel(a)i-love.sakura.ne.jp>
selinux: Add __GFP_NOWARN to allocation at str_read()
Dominique Martinet <dominique.martinet(a)cea.fr>
v9fs_dir_readdir: fix double-free on p9stat_read error
Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
tools/power/cpupower: fix compilation with STATIC=true
Rafał Miłecki <rafal(a)milecki.pl>
brcmfmac: fix reporting support for 160 MHz channels
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: mvm: fix regulatory domain update when the firmware starts
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: mvm: support sta_statistics() even on older firmware
Vladimir Zapolskiy <vz(a)mleia.com>
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
MAINTAINERS: Add Sasha as a stable branch maintainer
Aaron Ma <aaron.ma(a)canonical.com>
usb: xhci: fix timeout for transition from RExit to U0
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
usb: dwc3: core: Clean up ULPI device
Dennis Wassenberg <dennis.wassenberg(a)secunet.com>
usb: core: Fix hub port connection events lost
-------------
Diffstat:
Documentation/sysctl/fs.txt | 36 ++
MAINTAINERS | 1 +
Makefile | 4 +-
arch/arm/kernel/head-common.S | 6 +-
arch/arm64/Makefile | 2 +-
arch/powerpc/include/asm/io.h | 20 +-
arch/powerpc/kvm/trace.h | 8 +-
arch/powerpc/kvm/trace_booke.h | 9 +-
arch/powerpc/kvm/trace_hv.h | 9 +-
arch/powerpc/kvm/trace_pr.h | 9 +-
arch/powerpc/mm/numa.c | 2 +-
arch/s390/mm/gmap.c | 2 +
arch/x86/events/intel/uncore_snb.c | 115 ++++-
drivers/acpi/acpica/dsopcode.c | 4 +
drivers/block/floppy.c | 3 +-
drivers/cpufreq/imx6q-cpufreq.c | 7 +-
drivers/firmware/efi/arm-init.c | 4 +
drivers/firmware/efi/arm-runtime.c | 2 +-
drivers/firmware/efi/memmap.c | 3 +
drivers/gpio/gpiolib.c | 5 +-
drivers/gpu/drm/ast/ast_drv.c | 21 +
drivers/gpu/drm/ast/ast_mode.c | 3 +-
drivers/infiniband/core/verbs.c | 4 +-
drivers/infiniband/hw/hfi1/user_sdma.c | 106 ++---
drivers/input/joystick/xpad.c | 471 ++++++++++++++++-----
drivers/net/can/dev.c | 48 ++-
drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +-
drivers/net/usb/lan78xx.c | 42 +-
drivers/net/wireless/ath/ath10k/mac.c | 6 +
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 3 +-
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 +-
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c | 5 +-
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 10 +-
drivers/net/wireless/marvell/mwifiex/pcie.c | 19 +-
drivers/net/wireless/marvell/mwifiex/wmm.c | 12 +-
drivers/net/wireless/st/cw1200/wsm.c | 16 +-
drivers/nfc/nfcmrvl/uart.c | 5 +-
drivers/of/base.c | 25 ++
drivers/pinctrl/meson/pinctrl-meson.c | 2 +-
drivers/rtc/rtc-pcf2127.c | 3 +
drivers/scsi/ufs/ufs.h | 3 +-
drivers/scsi/ufs/ufshcd-pci.c | 2 +
drivers/scsi/ufs/ufshcd-pltfrm.c | 5 +-
drivers/scsi/ufs/ufshcd.c | 75 +++-
drivers/tty/n_tty.c | 20 +-
drivers/tty/tty_buffer.c | 2 +
drivers/usb/core/hub.c | 4 +-
drivers/usb/dwc3/core.c | 1 +
drivers/usb/host/xhci-hub.c | 66 ++-
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/host/xhci.h | 2 +-
fs/9p/vfs_dir.c | 11 -
fs/bfs/inode.c | 9 +-
fs/gfs2/ops_fstype.c | 2 +-
fs/namei.c | 53 ++-
include/linux/can/dev.h | 1 +
include/linux/fs.h | 2 +
include/linux/integrity.h | 1 +
include/linux/of.h | 8 +
include/linux/pfn_t.h | 2 +-
kernel/debug/kdb/kdb_io.c | 15 +-
kernel/debug/kdb/kdb_private.h | 2 +-
kernel/debug/kdb/kdb_support.c | 10 +-
kernel/sched/core.c | 4 +-
kernel/sysctl.c | 18 +
mm/shmem.c | 4 +-
mm/slab.c | 4 +
mm/slab_common.c | 12 +-
net/ieee802154/6lowpan/6lowpan_i.h | 4 +-
net/ieee802154/6lowpan/reassembly.c | 14 +-
net/llc/af_llc.c | 11 +-
net/sctp/associola.c | 10 +-
net/sunrpc/auth_generic.c | 8 +-
security/integrity/evm/evm.h | 2 +-
security/integrity/evm/evm_crypto.c | 87 +++-
security/integrity/evm/evm_main.c | 29 +-
security/integrity/iint.c | 3 +
security/integrity/ima/ima_api.c | 67 +--
security/integrity/ima/ima_appraise.c | 31 +-
security/integrity/ima/ima_crypto.c | 10 +
security/integrity/ima/ima_main.c | 77 ++--
security/integrity/integrity.h | 18 +-
security/selinux/ss/policydb.c | 2 +-
tools/power/cpupower/bench/Makefile | 2 +-
tools/power/cpupower/lib/cpufreq.c | 2 +-
tools/power/cpupower/lib/cpuidle.c | 2 +-
tools/power/cpupower/lib/cpupower.c | 4 +-
tools/power/cpupower/lib/cpupower_intern.h | 2 +-
88 files changed, 1325 insertions(+), 466 deletions(-)
This is the start of the stable review cycle for the 4.4.166 release.
There are 86 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sat Dec 1 14:00:43 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.166-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.4.166-rc1
Thomas Zimmermann <tzimmermann(a)suse.de>
drm/ast: Remove existing framebuffers before loading driver
Janosch Frank <frankja(a)linux.ibm.com>
s390/mm: Check for valid vma before zapping in gmap_discard
Salvatore Mesoraca <s.mesoraca16(a)gmail.com>
namei: allow restricted O_CREAT of FIFOs and regular files
Steven Rostedt (VMware) <rostedt(a)goodmis.org>
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
Qu Wenruo <wqu(a)suse.com>
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
Aaron Ma <aaron.ma(a)canonical.com>
usb: xhci: fix uninitialized completion when USB3 port got wrong status
Greg Kroah-Hartman <greg(a)kroah.com>
tty: wipe buffer if not echoing data
Linus Torvalds <torvalds(a)linux-foundation.org>
tty: wipe buffer.
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: mvm: fix regulatory domain update when the firmware starts
Mauricio Faria de Oliveira <mauricfo(a)linux.vnet.ibm.com>
scsi: qla2xxx: do not queue commands when unloading
Subhash Jadavani <subhashj(a)codeaurora.org>
scsi: ufshcd: release resources if probe fails
Subhash Jadavani <subhashj(a)codeaurora.org>
scsi: ufs: fix race between clock gating and devfreq scaling work
Venkat Gopalakrishnan <venkatg(a)codeaurora.org>
scsi: ufshcd: Fix race between clk scaling and ungate work
Yaniv Gardi <ygardi(a)codeaurora.org>
scsi: ufs: fix bugs related to null pointer access and array size
Liping Zhang <zlpnobody(a)gmail.com>
netfilter: nf_tables: fix oops when inserting an element into a verdict map
Karthik D A <karthida(a)marvell.com>
mwifiex: fix p2p device doesn't find in scan problem
Amitkumar Karwar <akarwar(a)marvell.com>
mwifiex: Fix NULL pointer dereference in skb_dequeue()
Johannes Thumshirn <jthumshirn(a)suse.de>
cw1200: Don't leak memory if krealloc failes
Ramses Ramírez <ramzeto(a)gmail.com>
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Enno Boland <gottox(a)voidlinux.eu>
Input: xpad - fix GPD Win 2 controller name
Ethan Lee <flibitijibibo(a)gmail.com>
Input: xpad - add GPD Win 2 Controller USB IDs
Marcus Folkesson <marcus.folkesson(a)gmail.com>
Input: xpad - avoid using __set_bit() for capabilities
Leo Sperling <leosperling97(a)gmail.com>
Input: xpad - fix some coding style issues
Francis Therien <frtherien(a)gmail.com>
Input: xpad - add PDP device id 0x02a4
Mark Furneaux <mark(a)furneaux.ca>
Input: xpad - add support for PDP Xbox One controllers
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - validate USB endpoint type during probe
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix PowerA init quirk for some gamepad models
Arvind Yadav <arvind.yadav.cs(a)gmail.com>
Input: xpad - constify usb_device_id
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with XBCD
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with 360Controller
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sync supported devices with xboxdrv
Benjamin Valentin <benpicco(a)googlemail.com>
Input: xpad - sort supported devices by USB ID
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - support some quirky Xbox One pads
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - restore LED state after device resume
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix stuck mode button on Xbox One S pad
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - don't depend on endpoint order
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - simplify error condition in init_output
Daniel Tobias <dan.g.tob(a)gmail.com>
Input: xpad - move reporting xbox one home button to common function
Daniel Tobias <dan.g.tob(a)gmail.com>
Input: xpad - correctly sort vendor id's
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - add product ID for Xbox One S pad
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - power off wireless 360 controllers on suspend
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - fix rumble on Xbox One controllers with 2015 firmware
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - xbox one elite controller support
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - add more third-party controllers
Cameron Gutman <aicommander(a)gmail.com>
Input: xpad - prevent spurious input from wired Xbox 360 controllers
Silvan Jegen <s.jegen(a)gmail.com>
Input: xpad - add Mad Catz FightStick TE 2 VID/PID
Arnd Bergmann <arnd(a)arndb.de>
Input: xpad - remove unused function
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - correct xbox one pad device name
Dmitry Torokhov <dmitry.torokhov(a)gmail.com>
Input: xpad - use LED API when identifying wireless controllers
Pavel Rojtberg <rojtberg(a)gmail.com>
Input: xpad - workaround dead irq_out after suspend/ resume
Pierre-Loup A. Griffais <githubpublic(a)plagman.net>
Input: xpad - update Xbox One Force Feedback Support
Pierre-Loup A. Griffais <pgriffais(a)valvesoftware.com>
Input: xpad - handle "present" and "gone" correctly
Clement Calmels <clement.calmels(a)free.fr>
Input: xpad - remove spurious events of wireless xpad 360 controller
Vasanthakumar Thiagarajan <vthiagar(a)qti.qualcomm.com>
ath10k: fix kernel panic due to race in accessing arvif list
Greg Hackmann <ghackmann(a)android.com>
arm64: remove no-op -p linker flag
Andy Lutomirski <luto(a)kernel.org>
x86/entry/64: Remove %ebx handling from error_entry/exit
Nicolas Iooss <nicolas.iooss_linux(a)m4x.org>
x86/entry: spell EBX register correctly in documentation
Johan Hovold <johan(a)kernel.org>
net: bcmgenet: fix OF child-node lookup
Johan Hovold <johan(a)kernel.org>
NFC: nfcmrvl_uart: fix OF child-node lookup
Johan Hovold <johan(a)kernel.org>
of: add helper to lookup compatible child node
Yufen Yu <yuyufen(a)huawei.com>
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
Satheesh Rajendran <sathnaga(a)linux.vnet.ibm.com>
powerpc/numa: Suppress "VPHN is not supported" messages
Prarit Bhargava <prarit(a)redhat.com>
kdb: Use strscpy with destination buffer size
Trond Myklebust <trond.myklebust(a)hammerspace.com>
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
Russell King <rmk+kernel(a)armlinux.org.uk>
ARM: make lookup_processor_type() non-__init
Anson Huang <anson.huang(a)nxp.com>
cpufreq: imx6q: add return value check for voltage scale
Scott Wood <oss(a)buserror.net>
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
Mathias Nyman <mathias.nyman(a)linux.intel.com>
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
Erik Schmauss <erik.schmauss(a)intel.com>
ACPICA: AML interpreter: add region addresses in global list during initialization
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
Y.C. Chen <yc_chen(a)aspeedtech.com>
drm/ast: fixed cursor may disappear sometimes
Y.C. Chen <yc_chen(a)aspeedtech.com>
drm/ast: change resolution may cause screen blurred
Eric Dumazet <edumazet(a)google.com>
llc: do not use sk_eat_skb()
Andrew Price <anprice(a)redhat.com>
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
Xin Long <lucien.xin(a)gmail.com>
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
bfs: add sanity check at bfs_fill_super()
Dominique Martinet <dominique.martinet(a)cea.fr>
v9fs_dir_readdir: fix double-free on p9stat_read error
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: mvm: support sta_statistics() even on older firmware
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
MAINTAINERS: Add Sasha as a stable branch maintainer
Aaron Ma <aaron.ma(a)canonical.com>
usb: xhci: fix timeout for transition from RExit to U0
Dennis Wassenberg <dennis.wassenberg(a)secunet.com>
usb: core: Fix hub port connection events lost
-------------
Diffstat:
Documentation/sysctl/fs.txt | 36 ++
MAINTAINERS | 1 +
Makefile | 4 +-
arch/arm/kernel/head-common.S | 6 +-
arch/arm64/Makefile | 2 +-
arch/powerpc/kvm/trace.h | 8 +-
arch/powerpc/kvm/trace_booke.h | 9 +-
arch/powerpc/kvm/trace_hv.h | 9 +-
arch/powerpc/kvm/trace_pr.h | 9 +-
arch/powerpc/mm/numa.c | 2 +-
arch/s390/mm/pgtable.c | 2 +
arch/x86/entry/entry_64.S | 20 +-
drivers/acpi/acpica/dsopcode.c | 4 +
drivers/cpufreq/imx6q-cpufreq.c | 7 +-
drivers/gpu/drm/ast/ast_drv.c | 21 +
drivers/gpu/drm/ast/ast_mode.c | 3 +-
drivers/input/joystick/xpad.c | 810 +++++++++++++++++++++------
drivers/net/can/dev.c | 48 +-
drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +-
drivers/net/wireless/ath/ath10k/mac.c | 6 +
drivers/net/wireless/cw1200/wsm.c | 16 +-
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 +-
drivers/net/wireless/iwlwifi/mvm/nvm.c | 5 +-
drivers/net/wireless/mwifiex/cfg80211.c | 10 +-
drivers/net/wireless/mwifiex/wmm.c | 12 +-
drivers/nfc/nfcmrvl/uart.c | 5 +-
drivers/of/base.c | 25 +
drivers/scsi/qla2xxx/qla_os.c | 5 +
drivers/scsi/ufs/ufs.h | 3 +-
drivers/scsi/ufs/ufshcd-pci.c | 2 +
drivers/scsi/ufs/ufshcd-pltfrm.c | 5 +-
drivers/scsi/ufs/ufshcd.c | 75 ++-
drivers/tty/n_tty.c | 19 +-
drivers/tty/tty_buffer.c | 2 +
drivers/usb/core/hub.c | 4 +-
drivers/usb/host/xhci-hub.c | 66 ++-
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/host/xhci.h | 2 +-
fs/9p/vfs_dir.c | 11 -
fs/bfs/inode.c | 9 +-
fs/btrfs/extent-tree.c | 10 +-
fs/btrfs/ioctl.c | 11 +-
fs/gfs2/ops_fstype.c | 2 +-
fs/namei.c | 53 +-
include/linux/can/dev.h | 1 +
include/linux/fs.h | 2 +
include/linux/of.h | 8 +
kernel/debug/kdb/kdb_io.c | 15 +-
kernel/debug/kdb/kdb_private.h | 2 +-
kernel/debug/kdb/kdb_support.c | 10 +-
kernel/sched/core.c | 4 +-
kernel/sysctl.c | 18 +
mm/shmem.c | 4 +-
net/llc/af_llc.c | 11 +-
net/netfilter/nf_tables_api.c | 1 +
net/sctp/associola.c | 10 +-
net/sunrpc/auth_generic.c | 8 +-
57 files changed, 1126 insertions(+), 343 deletions(-)
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/khugepaged: collapse_shmem() do not crash on Compound
collapse_shmem()'s VM_BUG_ON_PAGE(PageTransCompound) was unsafe: before it
holds page lock of the first page, racing truncation then extension might
conceivably have inserted a hugepage there already. Fail with the
SCAN_PAGE_COMPOUND result, instead of crashing (CONFIG_DEBUG_VM=y) or
otherwise mishandling the unexpected hugepage - though later we might code
up a more constructive way of handling it, with SCAN_SUCCESS.
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261529310.2275@eggly.anvils
Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Cc: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/khugepaged.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/mm/khugepaged.c~mm-khugepaged-collapse_shmem-do-not-crash-on-compound
+++ a/mm/khugepaged.c
@@ -1399,7 +1399,15 @@ static void collapse_shmem(struct mm_str
*/
VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_PAGE(!PageUptodate(page), page);
- VM_BUG_ON_PAGE(PageTransCompound(page), page);
+
+ /*
+ * If file was truncated then extended, or hole-punched, before
+ * we locked the first page, then a THP might be there already.
+ */
+ if (PageTransCompound(page)) {
+ result = SCAN_PAGE_COMPOUND;
+ goto out_unlock;
+ }
if (page_mapping(page) != mapping) {
result = SCAN_TRUNCATED;
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/khugepaged: collapse_shmem() without freezing new_page
khugepaged's collapse_shmem() does almost all of its work, to assemble the
huge new_page from 512 scattered old pages, with the new_page's refcount
frozen to 0 (and refcounts of all old pages so far also frozen to 0).
Including shmem_getpage() to read in any which were out on swap, memory
reclaim if necessary to allocate their intermediate pages, and copying
over all the data from old to new.
Imagine the frozen refcount as a spinlock held, but without any lock
debugging to highlight the abuse: it's not good, and under serious load
heads into lockups - speculative getters of the page are not expecting to
spin while khugepaged is rescheduled.
One can get a little further under load by hacking around elsewhere; but
fortunately, freezing the new_page turns out to have been entirely
unnecessary, with no hacks needed elsewhere.
The huge new_page lock is already held throughout, and guards all its
subpages as they are brought one by one into the page cache tree; and
anything reading the data in that page, without the lock, before it has
been marked PageUptodate, would already be in the wrong. So simply
eliminate the freezing of the new_page.
Each of the old pages remains frozen with refcount 0 after it has been
replaced by a new_page subpage in the page cache tree, until they are all
unfrozen on success or failure: just as before. They could be unfrozen
sooner, but cause no problem once no longer visible to find_get_entry(),
filemap_map_pages() and other speculative lookups.
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261527570.2275@eggly.anvils
Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/khugepaged.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
--- a/mm/khugepaged.c~mm-khugepaged-collapse_shmem-without-freezing-new_page
+++ a/mm/khugepaged.c
@@ -1287,7 +1287,7 @@ static void retract_page_tables(struct a
* collapse_shmem - collapse small tmpfs/shmem pages into huge one.
*
* Basic scheme is simple, details are more complex:
- * - allocate and freeze a new huge page;
+ * - allocate and lock a new huge page;
* - scan page cache replacing old pages with the new one
* + swap in pages if necessary;
* + fill in gaps;
@@ -1295,11 +1295,11 @@ static void retract_page_tables(struct a
* - if replacing succeeds:
* + copy data over;
* + free old pages;
- * + unfreeze huge page;
+ * + unlock huge page;
* - if replacing failed;
* + put all pages back and unfreeze them;
* + restore gaps in the page cache;
- * + free huge page;
+ * + unlock and free huge page;
*/
static void collapse_shmem(struct mm_struct *mm,
struct address_space *mapping, pgoff_t start,
@@ -1333,13 +1333,11 @@ static void collapse_shmem(struct mm_str
__SetPageSwapBacked(new_page);
new_page->index = start;
new_page->mapping = mapping;
- BUG_ON(!page_ref_freeze(new_page, 1));
/*
- * At this point the new_page is 'frozen' (page_count() is zero),
- * locked and not up-to-date. It's safe to insert it into the page
- * cache, because nobody would be able to map it or use it in other
- * way until we unfreeze it.
+ * At this point the new_page is locked and not up-to-date.
+ * It's safe to insert it into the page cache, because nobody would
+ * be able to map it or use it in another way until we unlock it.
*/
/* This will be less messy when we use multi-index entries */
@@ -1491,9 +1489,8 @@ xa_unlocked:
index++;
}
- /* Everything is ready, let's unfreeze the new_page */
SetPageUptodate(new_page);
- page_ref_unfreeze(new_page, HPAGE_PMD_NR);
+ page_ref_add(new_page, HPAGE_PMD_NR - 1);
set_page_dirty(new_page);
mem_cgroup_commit_charge(new_page, memcg, false, true);
lru_cache_add_anon(new_page);
@@ -1541,8 +1538,6 @@ xa_unlocked:
VM_BUG_ON(nr_none);
xas_unlock_irq(&xas);
- /* Unfreeze new_page, caller would take care about freeing it */
- page_ref_unfreeze(new_page, 1);
mem_cgroup_cancel_charge(new_page, memcg, true);
new_page->mapping = NULL;
}
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/khugepaged: collapse_shmem() remember to clear holes
Huge tmpfs testing reminds us that there is no __GFP_ZERO in the gfp flags
khugepaged uses to allocate a huge page - in all common cases it would
just be a waste of effort - so collapse_shmem() must remember to clear out
any holes that it instantiates.
The obvious place to do so, where they are put into the page cache tree,
is not a good choice: because interrupts are disabled there. Leave it
until further down, once success is assured, where the other pages are
copied (before setting PageUptodate).
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261525080.2275@eggly.anvils
Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/khugepaged.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/mm/khugepaged.c~mm-khugepaged-collapse_shmem-remember-to-clear-holes
+++ a/mm/khugepaged.c
@@ -1467,7 +1467,12 @@ xa_unlocked:
* Replacing old pages with new one has succeeded, now we
* need to copy the content and free the old pages.
*/
+ index = start;
list_for_each_entry_safe(page, tmp, &pagelist, lru) {
+ while (index < page->index) {
+ clear_highpage(new_page + (index % HPAGE_PMD_NR));
+ index++;
+ }
copy_highpage(new_page + (page->index % HPAGE_PMD_NR),
page);
list_del(&page->lru);
@@ -1477,6 +1482,11 @@ xa_unlocked:
ClearPageActive(page);
ClearPageUnevictable(page);
put_page(page);
+ index++;
+ }
+ while (index < end) {
+ clear_highpage(new_page + (index % HPAGE_PMD_NR));
+ index++;
}
local_irq_disable();
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/khugepaged: fix crashes due to misaccounted holes
Huge tmpfs testing on a shortish file mapped into a pmd-rounded extent hit
shmem_evict_inode()'s WARN_ON(inode->i_blocks) followed by clear_inode()'s
BUG_ON(inode->i_data.nrpages) when the file was later closed and unlinked.
khugepaged's collapse_shmem() was forgetting to update mapping->nrpages on
the rollback path, after it had added but then needs to undo some holes.
There is indeed an irritating asymmetry between shmem_charge(), whose
callers want it to increment nrpages after successfully accounting blocks,
and shmem_uncharge(), when __delete_from_page_cache() already decremented
nrpages itself: oh well, just add a comment on that to them both.
And shmem_recalc_inode() is supposed to be called when the accounting is
expected to be in balance (so it can deduce from imbalance that reclaim
discarded some pages): so change shmem_charge() to update nrpages earlier
(though it's rare for the difference to matter at all).
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261523450.2275@eggly.anvils
Fixes: 800d8c63b2e98 ("shmem: add huge pages support")
Fixes: f3f0e1d2150b2 ("khugepaged: add support of collapse for tmpfs/shmem pages")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/khugepaged.c | 5 ++++-
mm/shmem.c | 6 +++++-
2 files changed, 9 insertions(+), 2 deletions(-)
--- a/mm/khugepaged.c~mm-khugepaged-fix-crashes-due-to-misaccounted-holes
+++ a/mm/khugepaged.c
@@ -1506,9 +1506,12 @@ xa_unlocked:
khugepaged_pages_collapsed++;
} else {
struct page *page;
+
/* Something went wrong: roll back page cache changes */
- shmem_uncharge(mapping->host, nr_none);
xas_lock_irq(&xas);
+ mapping->nrpages -= nr_none;
+ shmem_uncharge(mapping->host, nr_none);
+
xas_set(&xas, start);
xas_for_each(&xas, page, end - 1) {
page = list_first_entry_or_null(&pagelist,
--- a/mm/shmem.c~mm-khugepaged-fix-crashes-due-to-misaccounted-holes
+++ a/mm/shmem.c
@@ -297,12 +297,14 @@ bool shmem_charge(struct inode *inode, l
if (!shmem_inode_acct_block(inode, pages))
return false;
+ /* nrpages adjustment first, then shmem_recalc_inode() when balanced */
+ inode->i_mapping->nrpages += pages;
+
spin_lock_irqsave(&info->lock, flags);
info->alloced += pages;
inode->i_blocks += pages * BLOCKS_PER_PAGE;
shmem_recalc_inode(inode);
spin_unlock_irqrestore(&info->lock, flags);
- inode->i_mapping->nrpages += pages;
return true;
}
@@ -312,6 +314,8 @@ void shmem_uncharge(struct inode *inode,
struct shmem_inode_info *info = SHMEM_I(inode);
unsigned long flags;
+ /* nrpages adjustment done by __delete_from_page_cache() or caller */
+
spin_lock_irqsave(&info->lock, flags);
info->alloced -= pages;
inode->i_blocks -= pages * BLOCKS_PER_PAGE;
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
Huge tmpfs testing, on 32-bit kernel with lockdep enabled, showed that
__split_huge_page() was using i_size_read() while holding the irq-safe
lru_lock and page tree lock, but the 32-bit i_size_read() uses an
irq-unsafe seqlock which should not be nested inside them.
Instead, read the i_size earlier in split_huge_page_to_list(), and pass
the end offset down to __split_huge_page(): all while holding head page
lock, which is enough to prevent truncation of that extent before the page
tree lock has been taken.
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261520070.2275@eggly.anvils
Fixes: baa355fd33142 ("thp: file pages support for split_huge_page()")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/huge_memory.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
--- a/mm/huge_memory.c~mm-huge_memory-fix-lockdep-complaint-on-32-bit-i_size_read
+++ a/mm/huge_memory.c
@@ -2439,12 +2439,11 @@ static void __split_huge_page_tail(struc
}
static void __split_huge_page(struct page *page, struct list_head *list,
- unsigned long flags)
+ pgoff_t end, unsigned long flags)
{
struct page *head = compound_head(page);
struct zone *zone = page_zone(head);
struct lruvec *lruvec;
- pgoff_t end = -1;
int i;
lruvec = mem_cgroup_page_lruvec(head, zone->zone_pgdat);
@@ -2452,9 +2451,6 @@ static void __split_huge_page(struct pag
/* complete memcg works before add pages to LRU */
mem_cgroup_split_huge_fixup(head);
- if (!PageAnon(page))
- end = DIV_ROUND_UP(i_size_read(head->mapping->host), PAGE_SIZE);
-
for (i = HPAGE_PMD_NR - 1; i >= 1; i--) {
__split_huge_page_tail(head, i, lruvec, list);
/* Some pages can be beyond i_size: drop them from page cache */
@@ -2626,6 +2622,7 @@ int split_huge_page_to_list(struct page
int count, mapcount, extra_pins, ret;
bool mlocked;
unsigned long flags;
+ pgoff_t end;
VM_BUG_ON_PAGE(is_huge_zero_page(page), page);
VM_BUG_ON_PAGE(!PageLocked(page), page);
@@ -2648,6 +2645,7 @@ int split_huge_page_to_list(struct page
ret = -EBUSY;
goto out;
}
+ end = -1;
mapping = NULL;
anon_vma_lock_write(anon_vma);
} else {
@@ -2661,6 +2659,15 @@ int split_huge_page_to_list(struct page
anon_vma = NULL;
i_mmap_lock_read(mapping);
+
+ /*
+ *__split_huge_page() may need to trim off pages beyond EOF:
+ * but on 32-bit, i_size_read() takes an irq-unsafe seqlock,
+ * which cannot be nested inside the page tree lock. So note
+ * end now: i_size itself may be changed at any moment, but
+ * head page lock is good enough to serialize the trimming.
+ */
+ end = DIV_ROUND_UP(i_size_read(mapping->host), PAGE_SIZE);
}
/*
@@ -2707,7 +2714,7 @@ int split_huge_page_to_list(struct page
if (mapping)
__dec_node_page_state(page, NR_SHMEM_THPS);
spin_unlock(&pgdata->split_queue_lock);
- __split_huge_page(page, list, flags);
+ __split_huge_page(page, list, end, flags);
if (PageSwapCache(head)) {
swp_entry_t entry = { .val = page_private(head) };
_
From: Hugh Dickins <hughd(a)google.com>
Subject: mm/huge_memory: splitting set mapping+index before unfreeze
Huge tmpfs stress testing has occasionally hit shmem_undo_range()'s
VM_BUG_ON_PAGE(page_to_pgoff(page) != index, page).
Move the setting of mapping and index up before the page_ref_unfreeze() in
__split_huge_page_tail() to fix this: so that a page cache lookup cannot
get a reference while the tail's mapping and index are unstable.
In fact, might as well move them up before the smp_wmb(): I don't see an
actual need for that, but if I'm missing something, this way round is
safer than the other, and no less efficient.
You might argue that VM_BUG_ON_PAGE(page_to_pgoff(page) != index, page) is
misplaced, and should be left until after the trylock_page(); but left as
is has not crashed since, and gives more stringent assurance.
Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1811261516380.2275@eggly.anvils
Fixes: e9b61f19858a5 ("thp: reintroduce split_huge_page()")
Requires: 605ca5ede764 ("mm/huge_memory.c: reorder operations in __split_huge_page_tail()")
Signed-off-by: Hugh Dickins <hughd(a)google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Cc: Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
Cc: Jerome Glisse <jglisse(a)redhat.com>
Cc: Matthew Wilcox <willy(a)infradead.org>
Cc: <stable(a)vger.kernel.org> [4.8+]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/huge_memory.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/mm/huge_memory.c~mm-huge_memory-splitting-set-mappingindex-before-unfreeze
+++ a/mm/huge_memory.c
@@ -2402,6 +2402,12 @@ static void __split_huge_page_tail(struc
(1L << PG_unevictable) |
(1L << PG_dirty)));
+ /* ->mapping in first tail page is compound_mapcount */
+ VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
+ page_tail);
+ page_tail->mapping = head->mapping;
+ page_tail->index = head->index + tail;
+
/* Page flags must be visible before we make the page non-compound. */
smp_wmb();
@@ -2422,12 +2428,6 @@ static void __split_huge_page_tail(struc
if (page_is_idle(head))
set_page_idle(page_tail);
- /* ->mapping in first tail page is compound_mapcount */
- VM_BUG_ON_PAGE(tail > 2 && page_tail->mapping != TAIL_MAPPING,
- page_tail);
- page_tail->mapping = head->mapping;
-
- page_tail->index = head->index + tail;
page_cpupid_xchg_last(page_tail, page_cpupid_last(head));
/*
_