This is the start of the stable review cycle for the 4.9.40 release. There are 125 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 Thu Jul 27 19:19:43 UTC 2017. Anything received after that time might be too late. The whole patch series can be found in one patch at: kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.40-rc1.gz 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@xxxxxxxxxxxxxxxxxxx> Linux 4.9.40-rc1 Greg Hackmann <ghackmann@xxxxxxxxxx> alarmtimer: don't rate limit one-shot timers Chunyu Hu <chuhu@xxxxxxxxxx> tracing: Fix kmemleak in instance_rmdir Sudeep Holla <Sudeep.Holla@xxxxxxx> PM / Domains: defer dev_pm_domain_set() until genpd->attach_dev succeeds if present Jan Kara <jack@xxxxxxx> reiserfs: Don't clear SGID when inheriting ACLs Bjorn Andersson <bjorn.andersson@xxxxxxxxxx> spmi: Include OF based modalias in device uevent Stephen Boyd <stephen.boyd@xxxxxxxxxx> of: device: Export of_device_{get_modalias, uvent_modalias} to modules Prarit Bhargava <prarit@xxxxxxxxxx> acpi/nfit: Fix memory corruption/Unregister mce decoder on failure Amir Goldstein <amir73il@xxxxxxxxx> ovl: fix random return value on mount Jan Kara <jack@xxxxxxx> hfsplus: Don't clear SGID when inheriting ACLs Bart Van Assche <bart.vanassche@xxxxxxxxxxx> mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array Imre Deak <imre.deak@xxxxxxxxx> drm/mst: Avoid processing partially received up/down message transactions Imre Deak <imre.deak@xxxxxxxxx> drm/mst: Avoid dereferencing a NULL mstb in drm_dp_mst_handle_up_req() Imre Deak <imre.deak@xxxxxxxxx> drm/mst: Fix error handling during MST sideband message reception Ismail, Mustafa <mustafa.ismail@xxxxxxxxx> RDMA/core: Initialize port_num in qp_attr Yan, Zheng <zyan@xxxxxxxxxx> ceph: fix race in concurrent readdir Arnd Bergmann <arnd@xxxxxxxx> staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code Teddy Wang <teddy.wang@xxxxxxxxxxxxxxxxx> staging: sm750fb: avoid conflicting vesafb Ian Abbott <abbotti@xxxxxxxxx> staging: comedi: ni_mio_common: fix AO timer off-by-one regression Michael Gugino <michael.gugino.2@xxxxxxxxx> staging: rtl8188eu: add TL-WN722N v2 support Ingo Molnar <mingo@xxxxxxxxxx> Revert "perf/core: Drop kernel samples even though :u is specified" Jin Yao <yao.jin@xxxxxxxxxxxxxxx> perf annotate: Fix broken arrow at row 0 connecting jmp instruction to its target Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done Jiang Yi <jiangyilism@xxxxxxxxx> target: Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce Jan Kara <jack@xxxxxxx> udf: Fix deadlock between writeback and udf_setsize() NeilBrown <neilb@xxxxxxxx> NFS: only invalidate dentrys that are clearly invalid. Jason A. Donenfeld <Jason@xxxxxxxxx> sunrpc: use constant time memory comparison for mac Moni Shoua <monis@xxxxxxxxxxxx> IB/core: Namespace is mandatory input for address resolution Vladimir Neyelov <vladimirn@xxxxxxxxxxxx> IB/iser: Fix connection teardown race condition Chen Hong <chenhong3@xxxxxxxxxx> Input: i8042 - fix crash at boot time Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Fix a typo: s/preset/present/ in r2-to-r6 emulation error message Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Send SIGILL for R6 branches in `__compute_return_epc_for_insn' Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Send SIGILL for linked branches in `__compute_return_epc_for_insn' Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Rename `sigill_r6' to `sigill_r2r6' in `__compute_return_epc_for_insn' Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn' Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: math-emu: Prevent wrong ISA mode instruction emulation Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Fix unaligned PC interpretation in `compute_return_epc' Maciej W. Rozycki <macro@xxxxxxxxxx> MIPS: Actually decode JALX in `__compute_return_epc_for_insn' James Hogan <james.hogan@xxxxxxxxxx> MIPS: Save static registers before sysmips Maciej W. Rozycki <macro@xxxxxxxxxxxxxx> MIPS: Fix MIPS I ISA /proc/cpuinfo reporting Seunghun Han <kkamagui@xxxxxxxxx> x86/ioapic: Pass the correct data to unmask_ioapic_irq() Seunghun Han <kkamagui@xxxxxxxxx> x86/acpi: Prevent out of bound access caused by broken ACPI tables Lv Zheng <lv.zheng@xxxxxxxxx> Revert "ACPI / EC: Enable event freeze mode..." to fix a regression Lv Zheng <lv.zheng@xxxxxxxxx> ACPI / EC: Drop EC noirq hooks to fix a regression Richard Weinberger <richard@xxxxxx> ubifs: Don't leak kernel memory to the MTD James Hogan <james.hogan@xxxxxxxxxx> MIPS: Negate error syscall return in trace James Hogan <james.hogan@xxxxxxxxxx> MIPS: Fix mips_atomic_set() with EVA James Hogan <james.hogan@xxxxxxxxxx> MIPS: Fix mips_atomic_set() retry condition Dan Carpenter <dan.carpenter@xxxxxxxxxx> ftrace: Fix uninitialized variable in match_records() Marta Rybczynska <mrybczyn@xxxxxxxxx> nvme-rdma: remove race conditions from IB signalling Alex Williamson <alex.williamson@xxxxxxxxxx> vfio: New external user group/file match Alex Williamson <alex.williamson@xxxxxxxxxx> vfio: Fix group release deadlock Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx> ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials John Brooks <john@xxxxxxxxxxxxx> drm/ttm: Fix use-after-free in ttm_bo_clean_mm Jaegeuk Kim <jaegeuk@xxxxxxxxxx> f2fs: Don't clear SGID when inheriting ACLs Jin Qian <jinqian@xxxxxxxxxxx> f2fs: sanity check size of nat and sit cache Jan Kara <jack@xxxxxxx> xfs: Don't clear SGID when inheriting ACLs Corey Minyard <cminyard@xxxxxxxxxx> ipmi:ssif: Add missing unlock in error branch Tony Camuso <tcamuso@xxxxxxxxxx> ipmi: use rcu lock around call to intf->handlers->sender() Mario Kleiner <mario.kleiner.de@xxxxxxxxx> drm/radeon: Fix eDP for single-display iMac10,1 (v2) Alex Deucher <alexander.deucher@xxxxxxx> drm/radeon/ci: disable mclk switching for high refresh rates (v2) Tom St Denis <tom.stdenis@xxxxxxx> drm/amd/amdgpu: Return error if initiating read out of range on vram Jiri Olsa <jolsa@xxxxxxxxxx> s390/syscalls: Fix out of bounds arguments access Xiao Ni <xni@xxxxxxxxxx> Raid5 should update rdev->sectors after reshape Jan Kara <jack@xxxxxxx> ext2: Don't clear SGID when inheriting ACLs Toshi Kani <toshi.kani@xxxxxxx> libnvdimm: fix badblock range handling of ARS range Vishal Verma <vishal.l.verma@xxxxxxxxx> libnvdimm, btt: fix btt_rw_page not returning errors Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx> cx88: Fix regression in initial video standard setting Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> x86/xen: allow userspace access during hypercalls Mikulas Patocka <mpatocka@xxxxxxxxxx> md: don't use flush_signals in userspace processes Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> usb: renesas_usbhs: gadget: disable all eps when the driver stops Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> usb: renesas_usbhs: fix usbhsc_resume() for !USBHSF_RUNTIME_PWCTRL Johan Hovold <johan@xxxxxxxxxx> USB: cdc-acm: add device-id for quirky printer Colin Ian King <colin.king@xxxxxxxxxxxxx> usb: storage: return on error to avoid a null pointer dereference Devin Heitmueller <dheitmueller@xxxxxxxxxxxxxx> mxl111sf: Fix driver to use heap allocate buffers for USB messages Jiahau Chang <jiahau@xxxxxxxxx> xhci: Bad Ethernet performance plugged in ASM1042A host Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> xhci: Fix NULL pointer dereference when cleaning up streams for removed host Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> xhci: fix 20000ms port resume timeout Julian Anastasov <ja@xxxxxx> ipvs: SNAT packet replies only for NATed connections Chen Yu <yu.c.chen@xxxxxxxxx> PCI/PM: Restore the status of PCI devices across hibernation Shawn Lin <shawn.lin@xxxxxxxxxxxxxx> PCI: rockchip: Use normal register bank for config accessors Bjorn Helgaas <bhelgaas@xxxxxxxxxx> PCI: Work around poweroff & suspend-to-RAM issue on Macbook Pro 11 Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> af_key: Fix sadb_x_ipsecrequest parsing Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> powerpc/mm/radix: Properly clear process table entry Oliver O'Halloran <oohall@xxxxxxxxx> powerpc/asm: Mark cr0 as clobbered in mftb() Anton Blanchard <anton@xxxxxxxxx> powerpc: Fix emulation of mfocrf in emulate_step() Anton Blanchard <anton@xxxxxxxxx> powerpc: Fix emulation of mcrf in emulate_step() Michael Ellerman <mpe@xxxxxxxxxxxxxx> powerpc/64: Fix atomic64_inc_not_zero() to return an int Balbir Singh <bsingharora@xxxxxxxxx> powerpc/pseries: Fix passing of pp0 in updatepp() and updateboltedpp() Bart Van Assche <bart.vanassche@xxxxxxxxxxx> xen/scsiback: Fix a TMR related use-after-free Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> iscsi-target: Add login_keys_workaround attribute for non RFC initiators Ewan D. Milne <emilne@xxxxxxxxxx> scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state Maurizio Lombardi <mlombard@xxxxxxxxxx> scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails. Krzysztof Kozlowski <krzk@xxxxxxxxxx> PM / Domains: Fix unsafe iteration over modified list of domains Krzysztof Kozlowski <krzk@xxxxxxxxxx> PM / Domains: Fix unsafe iteration over modified list of domain providers Krzysztof Kozlowski <krzk@xxxxxxxxxx> PM / Domains: Fix unsafe iteration over modified list of device links Satish Babu Patakokila <sbpata@xxxxxxxxxxxxxx> ASoC: compress: Derive substream from stream based on direction Matwey V Kornilov <matwey@xxxxxxxxxx> igb: Explicitly select page 0 at initialization Jan Kara <jack@xxxxxxx> btrfs: Don't clear SGID when inheriting ACLs Arnd Bergmann <arnd@xxxxxxxx> wlcore: fix 64K page support Jason A. Donenfeld <Jason@xxxxxxxxx> Bluetooth: use constant time memory comparison for secret values Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Clear FUP flag on error Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Use FUP always when scanning for an IP Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Ensure never to set 'last_ip' when packet 'count' is zero Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Fix last_ip usage Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Ensure IP is zero when state is INTEL_PT_STATE_NO_IP Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Fix missing stack clear Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Improve sample timestamp Adrian Hunter <adrian.hunter@xxxxxxxxx> perf intel-pt: Move decoder error setting into one condition Mateusz Jurczyk <mjurczyk@xxxxxxxxxx> NFC: Add sockaddr length checks before accessing sa_family in bind handlers Mateusz Jurczyk <mjurczyk@xxxxxxxxxx> nfc: Fix the sockaddr length sanitization in llcp_sock_connect Mateusz Jurczyk <mjurczyk@xxxxxxxxxx> nfc: Ensure presence of required attributes in the activate_target handler Johan Hovold <johan@xxxxxxxxxx> NFC: nfcmrvl: fix firmware-management initialisation Johan Hovold <johan@xxxxxxxxxx> NFC: nfcmrvl: use nfc-device for firmware download Johan Hovold <johan@xxxxxxxxxx> NFC: nfcmrvl: do not use device-managed resources Johan Hovold <johan@xxxxxxxxxx> NFC: nfcmrvl_uart: add missing tty-device sanity check Johan Hovold <johan@xxxxxxxxxx> NFC: fix broken device allocation Miaoqing Pan <miaoqing@xxxxxxxxxxxxxx> ath9k: fix an invalid pointer dereference in ath9k_rng_stop() Miaoqing Pan <miaoqing@xxxxxxxxxxxxxx> ath9k: fix tx99 bus error Miaoqing Pan <miaoqing@xxxxxxxxxxxxxx> ath9k: fix tx99 use after free Viresh Kumar <viresh.kumar@xxxxxxxxxx> thermal: cpu_cooling: Avoid accessing potentially freed structures Johan Hovold <johan@xxxxxxxxxx> thermal: max77620: fix device-node reference imbalance Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> s5p-jpeg: don't return a random width/height Mike Snitzer <snitzer@xxxxxxxxxx> dm mpath: cleanup -Wbool-operation warning in choose_pgpath() Arnd Bergmann <arnd@xxxxxxxx> ir-core: fix gcc-7 warning on bool arithmetic Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> disable new gcc-7.1.1 warnings for now ------------- Diffstat: Makefile | 7 +- arch/mips/include/asm/branch.h | 5 +- arch/mips/kernel/branch.c | 71 +++++++++----------- arch/mips/kernel/proc.c | 2 +- arch/mips/kernel/ptrace.c | 2 +- arch/mips/kernel/scall32-o32.S | 2 +- arch/mips/kernel/scall64-64.S | 2 +- arch/mips/kernel/scall64-n32.S | 2 +- arch/mips/kernel/scall64-o32.S | 2 +- arch/mips/kernel/syscall.c | 15 ++++- arch/mips/math-emu/cp1emu.c | 38 +++++++++++ arch/powerpc/include/asm/atomic.h | 4 +- arch/powerpc/include/asm/reg.h | 2 +- arch/powerpc/lib/sstep.c | 19 +++++- arch/powerpc/mm/mmu_context_book3s64.c | 12 +++- arch/powerpc/platforms/pseries/lpar.c | 11 ++- arch/s390/include/asm/syscall.h | 6 ++ arch/x86/include/asm/xen/hypercall.h | 3 + arch/x86/kernel/acpi/boot.c | 8 +++ arch/x86/kernel/apic/io_apic.c | 2 +- arch/x86/pci/fixup.c | 32 +++++++++ drivers/acpi/ec.c | 21 +----- drivers/acpi/nfit/core.c | 10 ++- drivers/base/power/domain.c | 20 +++--- drivers/char/ipmi/ipmi_msghandler.c | 5 ++ drivers/char/ipmi/ipmi_ssif.c | 5 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 + drivers/gpu/drm/drm_dp_mst_topology.c | 41 +++++++++--- drivers/gpu/drm/radeon/atombios_encoders.c | 13 +++- drivers/gpu/drm/radeon/ci_dpm.c | 6 ++ drivers/gpu/drm/ttm/ttm_bo.c | 4 +- drivers/infiniband/core/addr.c | 6 +- drivers/infiniband/core/cma.c | 2 + drivers/infiniband/hw/mlx5/mr.c | 2 +- drivers/infiniband/ulp/iser/iscsi_iser.c | 11 +++ drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/input/serio/i8042.c | 12 +++- drivers/md/dm-mpath.c | 4 +- drivers/md/raid1.c | 5 +- drivers/md/raid5.c | 9 +-- drivers/media/pci/cx88/cx88-cards.c | 9 ++- drivers/media/pci/cx88/cx88-video.c | 2 +- drivers/media/platform/s5p-jpeg/jpeg-core.c | 8 +-- drivers/media/rc/imon.c | 2 +- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 4 +- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 32 +++++---- drivers/media/usb/dvb-usb-v2/mxl111sf.h | 8 ++- drivers/misc/enclosure.c | 14 ++-- drivers/net/ethernet/intel/igb/e1000_82575.c | 1 + drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 - drivers/net/wireless/ath/ath9k/rng.c | 4 +- drivers/net/wireless/ath/ath9k/tx99.c | 13 ++-- drivers/net/wireless/ti/wlcore/spi.c | 6 +- drivers/nfc/nfcmrvl/fw_dnld.c | 7 +- drivers/nfc/nfcmrvl/main.c | 35 +++++----- drivers/nfc/nfcmrvl/uart.c | 8 +-- drivers/nvdimm/btt.c | 9 ++- drivers/nvdimm/core.c | 7 +- drivers/nvme/host/rdma.c | 20 +++--- drivers/of/device.c | 2 + drivers/pci/host/pcie-rockchip.c | 13 ++-- drivers/pci/pci-driver.c | 1 + drivers/scsi/scsi_scan.c | 5 +- drivers/scsi/scsi_sysfs.c | 8 ++- drivers/spmi/spmi.c | 12 ++++ drivers/staging/comedi/drivers/ni_mio_common.c | 3 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 19 ++++-- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 + drivers/staging/sm750fb/sm750.c | 24 +++++++ drivers/target/iscsi/iscsi_target_configfs.c | 2 + drivers/target/iscsi/iscsi_target_nego.c | 6 +- drivers/target/iscsi/iscsi_target_parameters.c | 41 ++++++++---- drivers/target/iscsi/iscsi_target_parameters.h | 2 +- drivers/target/iscsi/iscsi_target_tpg.c | 19 ++++++ drivers/target/iscsi/iscsi_target_tpg.h | 1 + drivers/target/target_core_transport.c | 9 +++ drivers/thermal/cpu_cooling.c | 4 +- drivers/thermal/max77620_thermal.c | 10 ++- drivers/usb/class/cdc-acm.c | 3 + drivers/usb/host/pci-quirks.c | 54 +++++++++++++++ drivers/usb/host/pci-quirks.h | 2 + drivers/usb/host/xhci-hub.c | 3 + drivers/usb/host/xhci-pci.c | 6 ++ drivers/usb/host/xhci-ring.c | 11 +-- drivers/usb/host/xhci.c | 6 ++ drivers/usb/host/xhci.h | 1 + drivers/usb/renesas_usbhs/common.c | 4 +- drivers/usb/renesas_usbhs/mod_gadget.c | 31 +++++++-- drivers/usb/storage/isd200.c | 5 +- drivers/vfio/vfio.c | 46 ++++++++++++- drivers/xen/xen-scsiback.c | 33 +++------ fs/btrfs/acl.c | 13 ++-- fs/ceph/dir.c | 5 ++ fs/ext2/acl.c | 36 ++++++---- fs/f2fs/acl.c | 2 +- fs/f2fs/segment.c | 7 ++ fs/hfsplus/posix_acl.c | 30 +++++---- fs/nfs/dir.c | 12 ++-- fs/nfs/inode.c | 4 +- fs/overlayfs/super.c | 9 ++- fs/reiserfs/xattr_acl.c | 12 ++-- fs/ubifs/journal.c | 10 +-- fs/udf/inode.c | 4 +- fs/xfs/xfs_acl.c | 6 +- fs/xfs/xfs_acl.h | 1 + fs/xfs/xfs_iops.c | 4 +- include/linux/vfio.h | 2 + include/scsi/scsi_device.h | 1 + include/target/iscsi/iscsi_target_core.h | 9 +++ kernel/events/core.c | 21 ------ kernel/time/alarmtimer.c | 3 +- kernel/trace/ftrace.c | 2 +- kernel/trace/trace.c | 1 + net/bluetooth/smp.c | 35 +++++----- net/key/af_key.c | 47 +++++++------ net/netfilter/ipvs/ip_vs_core.c | 19 ++++-- net/nfc/core.c | 31 +++++---- net/nfc/llcp_sock.c | 9 +-- net/nfc/nci/core.c | 3 +- net/nfc/netlink.c | 4 +- net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 +- sound/soc/soc-compress.c | 6 +- tools/perf/ui/browser.c | 2 +- .../perf/util/intel-pt-decoder/intel-pt-decoder.c | 78 +++++++++++++++++----- virt/kvm/vfio.c | 27 +++++--- 125 files changed, 1026 insertions(+), 438 deletions(-)