2019-11-27 21:49:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 000/132] 4.4.204-stable review

This is the start of the stable review cycle for the 4.4.204 release.
There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
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.204-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.4.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 4.4.204-rc1

Michael Ellerman <[email protected]>
KVM: PPC: Book3S HV: Flush link stack on guest exit to host kernel

Michael Ellerman <[email protected]>
powerpc/book3s64: Fix link stack flush on context switch

Christopher M. Riedl <[email protected]>
powerpc/64s: support nospectre_v2 cmdline option

Bernd Porr <[email protected]>
staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error

Aleksander Morgado <[email protected]>
USB: serial: option: add support for Foxconn T77W968 LTE modules

Aleksander Morgado <[email protected]>
USB: serial: option: add support for DW5821e with eSIM support

Johan Hovold <[email protected]>
USB: serial: mos7840: fix remote wakeup

Johan Hovold <[email protected]>
USB: serial: mos7720: fix remote wakeup

Pavel Löbl <[email protected]>
USB: serial: mos7840: add USB ID to support Moxa UPort 2210

Oliver Neukum <[email protected]>
appledisplay: fix error handling in the scheduled work

Greg Kroah-Hartman <[email protected]>
usb-serial: cp201x: support Mark-10 digital force gauge

Michael S. Tsirkin <[email protected]>
virtio_console: move removal code

Michael S. Tsirkin <[email protected]>
virtio_console: drop custom control queue cleanup

Michael S. Tsirkin <[email protected]>
virtio_console: fix uninitialized variable use

Laurent Vivier <[email protected]>
virtio_console: allocate inbufs in add_port() only if it is needed

Michael S. Tsirkin <[email protected]>
virtio_console: don't tie bufs to a vq

Michael S. Tsirkin <[email protected]>
virtio_console: reset on out of memory

Sean Young <[email protected]>
media: imon: invalid dereference in imon_touch_event

Vito Caputo <[email protected]>
media: cxusb: detect cxusb_ctrl_msg error in query

Oliver Neukum <[email protected]>
media: b2c2-flexcop-usb: add sanity checking

Kai Shen <[email protected]>
cpufreq: Add NULL checks to show() and store() methods of cpufreq

Alexander Popov <[email protected]>
media: vivid: Fix wrong locking that causes race conditions on streaming stop

Vandana BN <[email protected]>
media: vivid: Set vid_cap_streaming and vid_out_streaming to true

Waiman Long <[email protected]>
x86/speculation: Fix redundant MDS mitigation message

Waiman Long <[email protected]>
x86/speculation: Fix incorrect MDS/TAA mitigation status

Alexander Kapshuk <[email protected]>
x86/insn: Fix awk regexp warnings

Alexey Brodkin <[email protected]>
ARC: perf: Accommodate big-endian CPU

Adrian Hunter <[email protected]>
mmc: block: Fix tag condition with packed writes

Gang He <[email protected]>
ocfs2: remove ocfs2_is_o2cb_active()

Bo Yan <[email protected]>
cpufreq: Skip cpufreq resume if it's not suspended

Hari Vyas <[email protected]>
arm64: fix for bad_mode() handler to always result in panic

Bart Van Assche <[email protected]>
dm: use blk_set_queue_dying() in __dm_destroy()

Denis Efremov <[email protected]>
ath9k_hw: fix uninitialized variable data

Tomas Bortoli <[email protected]>
Bluetooth: Fix invalid-free in bcsp_close()

James Erwin <[email protected]>
IB/hfi1: Ensure full Gen3 speed in a Gen4 system

Vignesh R <[email protected]>
spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch

Kishon Vijay Abraham I <[email protected]>
PCI: keystone: Use quirk to limit MRRS for K2G

Nathan Chancellor <[email protected]>
pinctrl: zynq: Use define directive for PIN_CONFIG_IO_STANDARD

Brian Masney <[email protected]>
pinctrl: qcom: spmi-gpio: fix gpio-hog related boot issues

David Barmann <[email protected]>
sock: Reset dst when changing sk_mark via setsockopt

YueHaibing <[email protected]>
net: bcmgenet: return correct value 'ret' from bcmgenet_power_down

Tycho Andersen <[email protected]>
dlm: don't leak kernel pointer to userspace

Tycho Andersen <[email protected]>
dlm: fix invalid free

James Smart <[email protected]>
scsi: lpfc: fcoe: Fix link down issue after 1000+ link bounces

Shivasharan S <[email protected]>
scsi: megaraid_sas: Fix msleep granularity

Suganath Prabu <[email protected]>
scsi: mpt3sas: Fix driver modifying persistent data in Manufacturing page11

Suganath Prabu <[email protected]>
scsi: mpt3sas: Fix Sync cache command failure during driver unload

Shaokun Zhang <[email protected]>
rtlwifi: rtl8192de: Fix misleading REG_MCUFWDL information

Dan Carpenter <[email protected]>
wireless: airo: potential buffer overflow in sprintf()

Ali MJ Al-Nasrawy <[email protected]>
brcmsmac: never log "tid x is not agg'able" by default

Gustavo A. R. Silva <[email protected]>
rtl8xxxu: Fix missing break in switch

Christophe JAILLET <[email protected]>
wlcore: Fix the return value in case of error in 'wlcore_vendor_cmd_smart_config_start()'

Richard Guy Briggs <[email protected]>
audit: print empty EXECVE args

Valentin Schneider <[email protected]>
sched/fair: Don't increase sd->balance_interval on newidle balance

Eric Dumazet <[email protected]>
net: do not abort bulk send on BQL status

Larry Chen <[email protected]>
ocfs2: fix clusters leak in ocfs2_defrag_extent()

Changwei Ge <[email protected]>
ocfs2: don't put and assigning null to bh allocated outside

Dave Jiang <[email protected]>
ntb: intel: fix return value for ndev_vec_mask()

Jon Mason <[email protected]>
ntb_netdev: fix sleep time mismatch

Miroslav Lichvar <[email protected]>
igb: shorten maximum PHC timecounter update interval

Colin Ian King <[email protected]>
fs/hfs/extent.c: fix array out of bounds read of array extent

Ernesto A. Fernández <[email protected]>
hfs: fix return value of hfs_get_block()

Ernesto A. Fernández <[email protected]>
hfsplus: fix return value of hfsplus_get_block()

Ernesto A. Fernández <[email protected]>
hfs: prevent btree data loss on ENOSPC

Ernesto A. Fernández <[email protected]>
hfsplus: prevent btree data loss on ENOSPC

Ernesto A. Fernández <[email protected]>
hfs: fix BUG on bnode parent update

Ernesto A. Fernández <[email protected]>
hfsplus: fix BUG on bnode parent update

Rasmus Villemoes <[email protected]>
linux/bitmap.h: fix type of nbits in bitmap_shift_right()

Rasmus Villemoes <[email protected]>
linux/bitmap.h: handle constant zero-size bitmaps correctly

Anton Ivanov <[email protected]>
um: Make line/tty semantics use true write IRQ

Dave Chinner <[email protected]>
mm/page-writeback.c: fix range_cyclic writeback vs writepages deadlock

Jia-Ju Bai <[email protected]>
fs/ocfs2/dlm/dlmdebug.c: fix a sleep-in-atomic-context bug in dlm_print_one_mle()

David S. Miller <[email protected]>
sparc64: Rework xchg() definition to avoid warnings.

Geert Uytterhoeven <[email protected]>
thermal: rcar_thermal: Prevent hardware access during system suspend

Masami Hiramatsu <[email protected]>
selftests/ftrace: Fix to test kprobe $comm arg only if available

Marek Szyprowski <[email protected]>
mfd: max8997: Enale irq-wakeup unconditionally

Fabio Estevam <[email protected]>
mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values

Dan Carpenter <[email protected]>
qlcnic: fix a return in qlcnic_dcb_get_capability()

Nathan Chancellor <[email protected]>
mISDN: Fix type of switch control variable in ctrl_teimanager

Nathan Chancellor <[email protected]>
rtc: s35390a: Change buf's type to u8 in s35390a_init

Yan, Zheng <[email protected]>
ceph: fix dentry leak in ceph_readdir_prepopulate

David S. Miller <[email protected]>
sparc: Fix parport build warnings.

Vignesh R <[email protected]>
spi: omap2-mcspi: Set FIFO DMA trigger level to word length

Thomas Richter <[email protected]>
s390/perf: Return error when debug_register fails

Nathan Chancellor <[email protected]>
atm: zatm: Fix empty body Clang warnings

Trond Myklebust <[email protected]>
SUNRPC: Fix a compile warning for cmpxchg64()

Mattias Jacobsson <[email protected]>
USB: misc: appledisplay: fix backlight update_status return code

Benjamin Herrenschmidt <[email protected]>
macintosh/windfarm_smu_sat: Fix debug output

Philipp Klocke <[email protected]>
ALSA: i2c/cs8427: Fix int to char conversion

Steven Rostedt (VMware) <[email protected]>
kprobes, x86/ptrace.h: Make regs_get_kernel_stack_nth() not fault on bad stack

Kyeongdon Kim <[email protected]>
net: fix warning in af_unix

Christoph Hellwig <[email protected]>
scsi: dc395x: fix DMA API usage in sg_update_list

Christoph Hellwig <[email protected]>
scsi: dc395x: fix dma API usage in srb_done

Lubomir Rintel <[email protected]>
clk: mmp2: fix the clock id for sdh2_clk and sdh3_clk

Nathan Chancellor <[email protected]>
scsi: iscsi_tcp: Explicitly cast param in iscsi_sw_tcp_host_get_param

Nathan Chancellor <[email protected]>
scsi: isci: Change sci_controller_start_task's return type to sci_status

Nathan Chancellor <[email protected]>
scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handler

Uros Bizjak <[email protected]>
KVM/x86: Fix invvpid and invept register operand size in 64-bit mode

Gustavo A. R. Silva <[email protected]>
scsi: ips: fix missing break in switch

Omar Sandoval <[email protected]>
amiflop: clean up on errors during setup

Wenwen Wang <[email protected]>
misc: mic: fix a DMA pool free failure

Duncan Laurie <[email protected]>
gsmi: Fix bug in append_to_eventlog sysfs handler

Nikolay Borisov <[email protected]>
btrfs: handle error of get_old_root

Chaotian Jing <[email protected]>
mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail

Sergei Shtylyov <[email protected]>
spi: sh-msiof: fix deferred probing

Ali MJ Al-Nasrawy <[email protected]>
brcmsmac: AP mode: update beacon when TIM changes

Sam Bobroff <[email protected]>
powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field

Dan Carpenter <[email protected]>
powerpc: Fix signedness bug in update_flash_db()

Al Viro <[email protected]>
synclink_gt(): fix compat_ioctl()

Andreas Gruenbacher <[email protected]>
gfs2: Fix marking bitmaps non-full

Sergey Senozhatsky <[email protected]>
printk: fix integer overflow in setup_log_buf()

Takashi Sakamoto <[email protected]>
ALSA: isight: fix leak of reference to firewire unit in error path of .probe callback

Adrian Bunk <[email protected]>
mwifiex: Fix NL80211_TX_POWER_LIMITED

Arnd Bergmann <[email protected]>
platform/x86: asus-wmi: add SERIO_I8042 dependency

Hans de Goede <[email protected]>
platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi

Kiernan Hager <[email protected]>
platform/x86: asus-nb-wmi: Support ALS on the Zenbook UX430UQ

Oleksij Rempel <[email protected]>
platform/x86: asus-wmi: try to set als by default

Oleksij Rempel <[email protected]>
asus-wmi: provide access to ALS control

Kai-Chuan Hsieh <[email protected]>
platform/x86: asus-wmi: Set specified XUSB2PR value for X550LB

zino lin <[email protected]>
platform/x86: asus-wmi: fix asus ux303ub brightness issue

Oleksij Rempel <[email protected]>
platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A

João Paulo Rechi Vita <[email protected]>
asus-wmi: Add quirk_no_rfkill for the Asus Z550MA

João Paulo Rechi Vita <[email protected]>
asus-wmi: Add quirk_no_rfkill for the Asus U303LB

João Paulo Rechi Vita <[email protected]>
asus-wmi: Add quirk_no_rfkill for the Asus N552VW

João Paulo Rechi Vita <[email protected]>
asus-wmi: Add quirk_no_rfkill_wapf4 for the Asus X456UF

João Paulo Rechi Vita <[email protected]>
asus-wmi: Create quirk for airplane_mode LED

Andrey Ryabinin <[email protected]>
mm/ksm.c: don't WARN if page is still mapped in remove_stable_node()

Joseph Qi <[email protected]>
Revert "fs: ocfs2: fix possible null-pointer dereferences in ocfs2_xa_prepare_entry()"

Dan Carpenter <[email protected]>
net: rtnetlink: prevent underflows in do_setvfinfo()

Davide Caratti <[email protected]>
net/sched: act_pedit: fix WARN() in the traffic path

Martin Habets <[email protected]>
sfc: Only cancel the PPS workqueue if it exists

Luigi Rizzo <[email protected]>
net/mlx4_en: fix mlx4 ethtool -N insertion


-------------

Diffstat:

Documentation/hw-vuln/mds.rst | 7 +-
Documentation/hw-vuln/tsx_async_abort.rst | 5 +-
Documentation/kernel-parameters.txt | 11 ++
Makefile | 4 +-
arch/arc/kernel/perf_event.c | 4 +-
arch/arm64/kernel/traps.c | 1 -
arch/powerpc/include/asm/asm-prototypes.h | 3 +
arch/powerpc/include/asm/security_features.h | 3 +
arch/powerpc/kernel/eeh_pe.c | 2 +-
arch/powerpc/kernel/entry_64.S | 6 +
arch/powerpc/kernel/security.c | 74 ++++++++++-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 20 +++
arch/powerpc/platforms/ps3/os-area.c | 2 +-
arch/s390/kernel/perf_cpum_sf.c | 6 +-
arch/sparc/include/asm/cmpxchg_64.h | 7 +-
arch/sparc/include/asm/parport.h | 2 +
arch/um/drivers/line.c | 2 +-
arch/x86/include/asm/ptrace.h | 42 +++++-
arch/x86/kernel/cpu/bugs.c | 30 ++++-
arch/x86/kvm/vmx.c | 4 +-
arch/x86/tools/gen-insn-attr-x86.awk | 4 +-
drivers/atm/zatm.c | 42 +++---
drivers/block/amiflop.c | 84 ++++++------
drivers/bluetooth/hci_bcsp.c | 3 +
drivers/char/virtio_console.c | 140 +++++++++----------
drivers/clk/mmp/clk-of-mmp2.c | 4 +-
drivers/cpufreq/cpufreq.c | 9 ++
drivers/firmware/google/gsmi.c | 5 +-
drivers/isdn/mISDN/tei.c | 7 +-
drivers/macintosh/windfarm_smu_sat.c | 25 +---
drivers/md/dm.c | 4 +-
drivers/media/platform/vivid/vivid-kthread-cap.c | 8 +-
drivers/media/platform/vivid/vivid-kthread-out.c | 8 +-
drivers/media/platform/vivid/vivid-sdr-cap.c | 8 +-
drivers/media/platform/vivid/vivid-vid-cap.c | 3 -
drivers/media/platform/vivid/vivid-vid-out.c | 3 -
drivers/media/rc/imon.c | 3 +-
drivers/media/usb/b2c2/flexcop-usb.c | 3 +
drivers/media/usb/dvb-usb/cxusb.c | 3 +-
drivers/mfd/max8997.c | 8 +-
drivers/mfd/mc13xxx-core.c | 3 +-
drivers/misc/mic/scif/scif_fence.c | 2 +-
drivers/mmc/card/block.c | 3 +-
drivers/mmc/host/mtk-sd.c | 2 +-
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +-
drivers/net/ethernet/intel/igb/igb_ptp.c | 8 +-
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.c | 2 +-
drivers/net/ethernet/sfc/ptp.c | 3 +-
drivers/net/ntb_netdev.c | 2 +-
drivers/net/wireless/airo.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
.../net/wireless/brcm80211/brcmsmac/mac80211_if.c | 30 ++++-
drivers/net/wireless/brcm80211/brcmsmac/main.h | 1 +
drivers/net/wireless/mwifiex/cfg80211.c | 13 +-
drivers/net/wireless/mwifiex/ioctl.h | 1 +
drivers/net/wireless/mwifiex/sta_ioctl.c | 11 +-
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 1 +
.../net/wireless/realtek/rtlwifi/rtl8192de/fw.c | 2 +-
drivers/net/wireless/ti/wlcore/vendor_cmd.c | 2 +-
drivers/ntb/hw/intel/ntb_hw_intel.c | 2 +-
drivers/pci/host/pci-keystone.c | 3 +
drivers/pinctrl/pinctrl-zynq.c | 9 +-
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 21 ++-
drivers/platform/x86/Kconfig | 1 +
drivers/platform/x86/asus-nb-wmi.c | 148 ++++++++++++++++++++-
drivers/platform/x86/asus-wmi.c | 59 +++++++-
drivers/platform/x86/asus-wmi.h | 9 ++
drivers/rtc/rtc-s35390a.c | 2 +-
drivers/scsi/dc395x.c | 12 +-
drivers/scsi/ips.c | 1 +
drivers/scsi/isci/host.c | 8 +-
drivers/scsi/isci/host.h | 2 +-
drivers/scsi/isci/request.c | 4 +-
drivers/scsi/isci/task.c | 4 +-
drivers/scsi/iscsi_tcp.c | 3 +-
drivers/scsi/lpfc/lpfc_els.c | 2 +
drivers/scsi/lpfc/lpfc_hbadisc.c | 20 +++
drivers/scsi/lpfc/lpfc_init.c | 2 +-
drivers/scsi/lpfc/lpfc_sli.c | 11 +-
drivers/scsi/lpfc/lpfc_sli4.h | 1 +
drivers/scsi/megaraid/megaraid_sas_base.c | 4 +-
drivers/scsi/mpt3sas/mpt3sas_config.c | 4 -
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 36 ++++-
drivers/spi/spi-omap2-mcspi.c | 26 +---
drivers/spi/spi-sh-msiof.c | 4 +-
drivers/staging/comedi/drivers/usbduxfast.c | 21 ++-
drivers/staging/rdma/hfi1/pcie.c | 3 +-
drivers/thermal/rcar_thermal.c | 4 +-
drivers/tty/synclink_gt.c | 16 +--
drivers/usb/misc/appledisplay.c | 15 ++-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/mos7720.c | 4 -
drivers/usb/serial/mos7840.c | 16 ++-
drivers/usb/serial/option.c | 7 +
fs/btrfs/ctree.c | 4 +
fs/ceph/inode.c | 1 -
fs/dlm/member.c | 5 +-
fs/dlm/user.c | 2 +-
fs/gfs2/rgrp.c | 13 +-
fs/hfs/brec.c | 1 +
fs/hfs/btree.c | 41 +++---
fs/hfs/btree.h | 1 +
fs/hfs/catalog.c | 16 +++
fs/hfs/extent.c | 10 +-
fs/hfsplus/attributes.c | 10 ++
fs/hfsplus/brec.c | 1 +
fs/hfsplus/btree.c | 44 +++---
fs/hfsplus/catalog.c | 24 ++++
fs/hfsplus/extents.c | 8 +-
fs/hfsplus/hfsplus_fs.h | 2 +
fs/ocfs2/buffer_head_io.c | 77 ++++++++---
fs/ocfs2/dlm/dlmdebug.c | 2 +-
fs/ocfs2/dlmglue.c | 2 +-
fs/ocfs2/move_extents.c | 17 +++
fs/ocfs2/stackglue.c | 6 -
fs/ocfs2/stackglue.h | 3 -
fs/ocfs2/xattr.c | 56 ++++----
include/linux/bitmap.h | 9 +-
include/linux/mfd/max8997.h | 1 -
include/linux/mfd/mc13xxx.h | 1 +
kernel/auditsc.c | 2 +-
kernel/printk/printk.c | 2 +-
kernel/sched/fair.c | 13 +-
mm/ksm.c | 14 +-
mm/page-writeback.c | 33 +++--
net/core/dev.c | 2 +-
net/core/rtnetlink.c | 16 +++
net/core/sock.c | 6 +-
net/sched/act_pedit.c | 5 +-
net/sunrpc/auth_gss/gss_krb5_seal.c | 1 +
net/unix/af_unix.c | 2 +
sound/firewire/isight.c | 10 +-
sound/i2c/cs8427.c | 2 +-
.../util/intel-pt-decoder/gen-insn-attr-x86.awk | 4 +-
.../ftrace/test.d/kprobe/kprobe_args_syntax.tc | 3 +
136 files changed, 1166 insertions(+), 493 deletions(-)



2019-11-27 21:49:12

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 006/132] mm/ksm.c: dont WARN if page is still mapped in remove_stable_node()

From: Andrey Ryabinin <[email protected]>

commit 9a63236f1ad82d71a98aa80320b6cb618fb32f44 upstream.

It's possible to hit the WARN_ON_ONCE(page_mapped(page)) in
remove_stable_node() when it races with __mmput() and squeezes in
between ksm_exit() and exit_mmap().

WARNING: CPU: 0 PID: 3295 at mm/ksm.c:888 remove_stable_node+0x10c/0x150

Call Trace:
remove_all_stable_nodes+0x12b/0x330
run_store+0x4ef/0x7b0
kernfs_fop_write+0x200/0x420
vfs_write+0x154/0x450
ksys_write+0xf9/0x1d0
do_syscall_64+0x99/0x510
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Remove the warning as there is nothing scary going on.

Link: http://lkml.kernel.org/r/[email protected]
Fixes: cbf86cfe04a6 ("ksm: remove old stable nodes more thoroughly")
Signed-off-by: Andrey Ryabinin <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
mm/ksm.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -714,13 +714,13 @@ static int remove_stable_node(struct sta
return 0;
}

- if (WARN_ON_ONCE(page_mapped(page))) {
- /*
- * This should not happen: but if it does, just refuse to let
- * merge_across_nodes be switched - there is no need to panic.
- */
- err = -EBUSY;
- } else {
+ /*
+ * Page could be still mapped if this races with __mmput() running in
+ * between ksm_exit() and exit_mmap(). Just refuse to let
+ * merge_across_nodes/max_page_sharing be switched.
+ */
+ err = -EBUSY;
+ if (!page_mapped(page)) {
/*
* The stable node did not yet appear stale to get_ksm_page(),
* since that allows for an unmapped ksm page to be recognized


2019-11-27 21:49:20

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 081/132] wlcore: Fix the return value in case of error in wlcore_vendor_cmd_smart_config_start()

From: Christophe JAILLET <[email protected]>

[ Upstream commit 3419348a97bcc256238101129d69b600ceb5cc70 ]

We return 0 unconditionally at the end of
'wlcore_vendor_cmd_smart_config_start()'.
However, 'ret' is set to some error codes in several error handling paths
and we already return some error codes at the beginning of the function.

Return 'ret' instead to propagate the error code.

Fixes: 80ff8063e87c ("wlcore: handle smart config vendor commands")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/net/wireless/ti/wlcore/vendor_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wlcore/vendor_cmd.c b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
index fd4e9ba176c9b..332a3a5c1c900 100644
--- a/drivers/net/wireless/ti/wlcore/vendor_cmd.c
+++ b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
@@ -66,7 +66,7 @@ wlcore_vendor_cmd_smart_config_start(struct wiphy *wiphy,
out:
mutex_unlock(&wl->mutex);

- return 0;
+ return ret;
}

static int
--
2.20.1



2019-11-27 21:49:31

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 042/132] net: fix warning in af_unix

From: Kyeongdon Kim <[email protected]>

[ Upstream commit 33c4368ee2589c165aebd8d388cbd91e9adb9688 ]

This fixes the "'hash' may be used uninitialized in this function"

net/unix/af_unix.c:1041:20: warning: 'hash' may be used uninitialized in this function [-Wmaybe-uninitialized]
addr->hash = hash ^ sk->sk_type;

Signed-off-by: Kyeongdon Kim <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
net/unix/af_unix.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index b1a72615fdc30..b5e2ef242efe7 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -224,6 +224,8 @@ static inline void unix_release_addr(struct unix_address *addr)

static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned int *hashp)
{
+ *hashp = 0;
+
if (len <= sizeof(short) || len > sizeof(*sunaddr))
return -EINVAL;
if (!sunaddr || sunaddr->sun_family != AF_UNIX)
--
2.20.1



2019-11-27 21:50:10

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 009/132] asus-wmi: Add quirk_no_rfkill for the Asus N552VW

From: João Paulo Rechi Vita <[email protected]>

[ Upstream commit 2d735244b798f0c8bf93ace1facfafdc1f7a4e6e ]

The Asus N552VW has an airplane-mode indicator LED and the WMI WLAN user
bit set, so asus-wmi uses ASUS_WMI_DEVID_WLAN_LED (0x00010002) to store
the wlan state, which has a side-effect of driving the airplane mode
indicator LED in an inverted fashion. quirk_no_rfkill prevents asus-wmi
from registering RFKill switches at all for this laptop and allows
asus-wireless to drive the LED through the ASHS ACPI device.

Signed-off-by: João Paulo Rechi Vita <[email protected]>
Reviewed-by: Corentin Chary <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/platform/x86/asus-nb-wmi.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 904f210327a1c..0322b1cde825d 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -333,6 +333,15 @@ static const struct dmi_system_id asus_quirks[] = {
},
.driver_data = &quirk_no_rfkill,
},
+ {
+ .callback = dmi_matched,
+ .ident = "ASUSTeK COMPUTER INC. N552VW",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "N552VW"),
+ },
+ .driver_data = &quirk_no_rfkill,
+ },
{},
};

--
2.20.1



2019-11-27 21:50:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 045/132] macintosh/windfarm_smu_sat: Fix debug output

From: Benjamin Herrenschmidt <[email protected]>

[ Upstream commit fc0c8b36d379a046525eacb9c3323ca635283757 ]

There's some antiquated debug output that's trying
to do a hand-made hexdump and turning into horrible
1-byte-per-line output these days.

Use print_hex_dump() instead

Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/macintosh/windfarm_smu_sat.c | 25 +++++++------------------
1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index ad6223e883404..3d310dd60a0be 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -22,14 +22,6 @@

#define VERSION "1.0"

-#define DEBUG
-
-#ifdef DEBUG
-#define DBG(args...) printk(args)
-#else
-#define DBG(args...) do { } while(0)
-#endif
-
/* If the cache is older than 800ms we'll refetch it */
#define MAX_AGE msecs_to_jiffies(800)

@@ -106,13 +98,10 @@ struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, int id,
buf[i+2] = data[3];
buf[i+3] = data[2];
}
-#ifdef DEBUG
- DBG(KERN_DEBUG "sat %d partition %x:", sat_id, id);
- for (i = 0; i < len; ++i)
- DBG(" %x", buf[i]);
- DBG("\n");
-#endif

+ printk(KERN_DEBUG "sat %d partition %x:", sat_id, id);
+ print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET,
+ 16, 1, buf, len, false);
if (size)
*size = len;
return (struct smu_sdbp_header *) buf;
@@ -132,13 +121,13 @@ static int wf_sat_read_cache(struct wf_sat *sat)
if (err < 0)
return err;
sat->last_read = jiffies;
+
#ifdef LOTSA_DEBUG
{
int i;
- DBG(KERN_DEBUG "wf_sat_get: data is");
- for (i = 0; i < 16; ++i)
- DBG(" %.2x", sat->cache[i]);
- DBG("\n");
+ printk(KERN_DEBUG "wf_sat_get: data is");
+ print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET,
+ 16, 1, sat->cache, 16, false);
}
#endif
return 0;
--
2.20.1



2019-11-27 21:50:39

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 024/132] synclink_gt(): fix compat_ioctl()

From: Al Viro <[email protected]>

[ Upstream commit 27230e51349fde075598c1b59d15e1ff802f3f6e ]

compat_ptr() for pointer-taking ones...

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/tty/synclink_gt.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index 6fc39fbfc2755..b5145e8bdf0a2 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -1192,14 +1192,13 @@ static long slgt_compat_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct slgt_info *info = tty->driver_data;
- int rc = -ENOIOCTLCMD;
+ int rc;

if (sanity_check(info, tty->name, "compat_ioctl"))
return -ENODEV;
DBGINFO(("%s compat_ioctl() cmd=%08X\n", info->device_name, cmd));

switch (cmd) {
-
case MGSL_IOCSPARAMS32:
rc = set_params32(info, compat_ptr(arg));
break;
@@ -1219,18 +1218,11 @@ static long slgt_compat_ioctl(struct tty_struct *tty,
case MGSL_IOCWAITGPIO:
case MGSL_IOCGXSYNC:
case MGSL_IOCGXCTRL:
- case MGSL_IOCSTXIDLE:
- case MGSL_IOCTXENABLE:
- case MGSL_IOCRXENABLE:
- case MGSL_IOCTXABORT:
- case TIOCMIWAIT:
- case MGSL_IOCSIF:
- case MGSL_IOCSXSYNC:
- case MGSL_IOCSXCTRL:
- rc = ioctl(tty, cmd, arg);
+ rc = ioctl(tty, cmd, (unsigned long)compat_ptr(arg));
break;
+ default:
+ rc = ioctl(tty, cmd, arg);
}
-
DBGINFO(("%s compat_ioctl() cmd=%08X rc=%d\n", info->device_name, cmd, rc));
return rc;
}
--
2.20.1



2019-11-27 21:51:15

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 020/132] mwifiex: Fix NL80211_TX_POWER_LIMITED

From: Adrian Bunk <[email protected]>

[ Upstream commit 65a576e27309120e0621f54d5c81eb9128bd56be ]

NL80211_TX_POWER_LIMITED was treated as NL80211_TX_POWER_AUTOMATIC,
which is the opposite of what should happen and can cause nasty
regulatory problems.

if/else converted to a switch without default to make gcc warn
on unhandled enum values.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/net/wireless/mwifiex/cfg80211.c | 13 +++++++++++--
drivers/net/wireless/mwifiex/ioctl.h | 1 +
drivers/net/wireless/mwifiex/sta_ioctl.c | 11 +++++++----
3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 1e074eaf613d0..c6c2d3304dba7 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -365,11 +365,20 @@ mwifiex_cfg80211_set_tx_power(struct wiphy *wiphy,
struct mwifiex_power_cfg power_cfg;
int dbm = MBM_TO_DBM(mbm);

- if (type == NL80211_TX_POWER_FIXED) {
+ switch (type) {
+ case NL80211_TX_POWER_FIXED:
power_cfg.is_power_auto = 0;
+ power_cfg.is_power_fixed = 1;
power_cfg.power_level = dbm;
- } else {
+ break;
+ case NL80211_TX_POWER_LIMITED:
+ power_cfg.is_power_auto = 0;
+ power_cfg.is_power_fixed = 0;
+ power_cfg.power_level = dbm;
+ break;
+ case NL80211_TX_POWER_AUTOMATIC:
power_cfg.is_power_auto = 1;
+ break;
}

priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index 4f0174c649461..4cb7001603968 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -256,6 +256,7 @@ struct mwifiex_ds_encrypt_key {

struct mwifiex_power_cfg {
u32 is_power_auto;
+ u32 is_power_fixed;
u32 power_level;
};

diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 12eedb33db7ba..992f9feaea92e 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -666,6 +666,9 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
txp_cfg = (struct host_cmd_ds_txpwr_cfg *) buf;
txp_cfg->action = cpu_to_le16(HostCmd_ACT_GEN_SET);
if (!power_cfg->is_power_auto) {
+ u16 dbm_min = power_cfg->is_power_fixed ?
+ dbm : priv->min_tx_power_level;
+
txp_cfg->mode = cpu_to_le32(1);
pg_tlv = (struct mwifiex_types_power_group *)
(buf + sizeof(struct host_cmd_ds_txpwr_cfg));
@@ -680,7 +683,7 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
pg->last_rate_code = 0x03;
pg->modulation_class = MOD_CLASS_HR_DSSS;
pg->power_step = 0;
- pg->power_min = (s8) dbm;
+ pg->power_min = (s8) dbm_min;
pg->power_max = (s8) dbm;
pg++;
/* Power group for modulation class OFDM */
@@ -688,7 +691,7 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
pg->last_rate_code = 0x07;
pg->modulation_class = MOD_CLASS_OFDM;
pg->power_step = 0;
- pg->power_min = (s8) dbm;
+ pg->power_min = (s8) dbm_min;
pg->power_max = (s8) dbm;
pg++;
/* Power group for modulation class HTBW20 */
@@ -696,7 +699,7 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
pg->last_rate_code = 0x20;
pg->modulation_class = MOD_CLASS_HT;
pg->power_step = 0;
- pg->power_min = (s8) dbm;
+ pg->power_min = (s8) dbm_min;
pg->power_max = (s8) dbm;
pg->ht_bandwidth = HT_BW_20;
pg++;
@@ -705,7 +708,7 @@ int mwifiex_set_tx_power(struct mwifiex_private *priv,
pg->last_rate_code = 0x20;
pg->modulation_class = MOD_CLASS_HT;
pg->power_step = 0;
- pg->power_min = (s8) dbm;
+ pg->power_min = (s8) dbm_min;
pg->power_max = (s8) dbm;
pg->ht_bandwidth = HT_BW_40;
}
--
2.20.1



2019-11-27 21:51:22

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 019/132] platform/x86: asus-wmi: add SERIO_I8042 dependency

From: Arnd Bergmann <[email protected]>

[ Upstream commit ea893695ec1131a5fed0523ff8094bc6e8723bbe ]

A recent bugfix added a call to i8042_install_filter but did
not add the dependency, leading to possible link errors:

drivers/platform/built-in.o: In function `asus_nb_wmi_quirks':
asus-nb-wmi.c:(.text+0x23af): undefined reference to `i8042_install_filter'

This adds a dependency on SERIO_I8042||SERIO_I8042=n to indicate
that we can build the driver when the i8042 driver is disabled,
but it cannot be built-in when that is a loadable module.

Fixes: b5643539b825 ("platform/x86: asus-wmi: Filter buggy scan codes on ASUS Q500A")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/platform/x86/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 953974b5a9a95..6487453c68b59 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -566,6 +566,7 @@ config ASUS_WMI
config ASUS_NB_WMI
tristate "Asus Notebook WMI Driver"
depends on ASUS_WMI
+ depends on SERIO_I8042 || SERIO_I8042 = n
---help---
This is a driver for newer Asus notebooks. It adds extra features
like wireless radio and bluetooth control, leds, hotkeys, backlight...
--
2.20.1



2019-11-27 21:51:33

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 013/132] platform/x86: asus-wmi: fix asus ux303ub brightness issue

From: zino lin <[email protected]>

[ Upstream commit 999d4376c62828b260fbb59d5ab6bc28918ca448 ]

acpi_video0 doesn't work, asus-wmi brightness interface doesn't work, too.
So, we use native brightness interface to handle the brightness adjustion,
and add quirk_asus_ux303ub.

Signed-off-by: zino lin <[email protected]>
Acked-by: Corentin Chary <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++
drivers/platform/x86/asus-wmi.c | 3 +++
drivers/platform/x86/asus-wmi.h | 1 +
3 files changed, 17 insertions(+)

diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c
index 904e28d4db528..a619cbe4e852f 100644
--- a/drivers/platform/x86/asus-nb-wmi.c
+++ b/drivers/platform/x86/asus-nb-wmi.c
@@ -112,6 +112,10 @@ static struct quirk_entry quirk_no_rfkill_wapf4 = {
.no_rfkill = true,
};

+static struct quirk_entry quirk_asus_ux303ub = {
+ .wmi_backlight_native = true,
+};
+
static int dmi_matched(const struct dmi_system_id *dmi)
{
quirks = dmi->driver_data;
@@ -394,6 +398,15 @@ static const struct dmi_system_id asus_quirks[] = {
},
.driver_data = &quirk_no_rfkill,
},
+ {
+ .callback = dmi_matched,
+ .ident = "ASUSTeK COMPUTER INC. UX303UB",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
+ },
+ .driver_data = &quirk_asus_ux303ub,
+ },
{},
};

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 823f85b1b4dc6..de131cf4d2e4d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2082,6 +2082,9 @@ static int asus_wmi_add(struct platform_device *pdev)
if (asus->driver->quirks->wmi_backlight_power)
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);

+ if (asus->driver->quirks->wmi_backlight_native)
+ acpi_video_set_dmi_backlight_type(acpi_backlight_native);
+
if (acpi_video_get_backlight_type() == acpi_backlight_vendor) {
err = asus_wmi_backlight_init(asus);
if (err && err != -ENODEV)
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index dd2e6cc0f3d48..0e19014e9f542 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -44,6 +44,7 @@ struct quirk_entry {
bool scalar_panel_brightness;
bool store_backlight_power;
bool wmi_backlight_power;
+ bool wmi_backlight_native;
int wapf;
/*
* For machines with AMD graphic chips, it will send out WMI event
--
2.20.1



2019-11-27 21:55:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 015/132] asus-wmi: provide access to ALS control

From: Oleksij Rempel <[email protected]>

[ Upstream commit aca234f6378864d85514be558746c0ea6eabfa8e ]

Asus Zenbook ux31a is providing ACPI0008 interface for ALS
(Ambient Light Sensor), which is accessible for OS => Win 7.
This sensor can be used with iio/acpi-als driver.
Since it is disabled by default, we should use asus-wmi
interface to enable it.

Signed-off-by: Oleksij Rempel <[email protected]>
Signed-off-by: Darren Hart <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/platform/x86/asus-wmi.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index a2174f01d3122..2dee91537123e 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -117,6 +117,7 @@ MODULE_LICENSE("GPL");
#define ASUS_WMI_DEVID_LED6 0x00020016

/* Backlight and Brightness */
+#define ASUS_WMI_DEVID_ALS_ENABLE 0x00050001 /* Ambient Light Sensor */
#define ASUS_WMI_DEVID_BACKLIGHT 0x00050011
#define ASUS_WMI_DEVID_BRIGHTNESS 0x00050012
#define ASUS_WMI_DEVID_KBD_BACKLIGHT 0x00050021
@@ -1759,6 +1760,7 @@ ASUS_WMI_CREATE_DEVICE_ATTR(touchpad, 0644, ASUS_WMI_DEVID_TOUCHPAD);
ASUS_WMI_CREATE_DEVICE_ATTR(camera, 0644, ASUS_WMI_DEVID_CAMERA);
ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
ASUS_WMI_CREATE_DEVICE_ATTR(lid_resume, 0644, ASUS_WMI_DEVID_LID_RESUME);
+ASUS_WMI_CREATE_DEVICE_ATTR(als_enable, 0644, ASUS_WMI_DEVID_ALS_ENABLE);

static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
@@ -1785,6 +1787,7 @@ static struct attribute *platform_attributes[] = {
&dev_attr_cardr.attr,
&dev_attr_touchpad.attr,
&dev_attr_lid_resume.attr,
+ &dev_attr_als_enable.attr,
NULL
};

@@ -1805,6 +1808,8 @@ static umode_t asus_sysfs_is_visible(struct kobject *kobj,
devid = ASUS_WMI_DEVID_TOUCHPAD;
else if (attr == &dev_attr_lid_resume.attr)
devid = ASUS_WMI_DEVID_LID_RESUME;
+ else if (attr == &dev_attr_als_enable.attr)
+ devid = ASUS_WMI_DEVID_ALS_ENABLE;

if (devid != -1)
ok = !(asus_wmi_get_devstate_simple(asus, devid) < 0);
--
2.20.1



2019-11-27 21:56:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 061/132] fs/ocfs2/dlm/dlmdebug.c: fix a sleep-in-atomic-context bug in dlm_print_one_mle()

From: Jia-Ju Bai <[email protected]>

[ Upstream commit 999865764f5f128896402572b439269acb471022 ]

The kernel module may sleep with holding a spinlock.

The function call paths (from bottom to top) in Linux-4.16 are:

[FUNC] get_zeroed_page(GFP_NOFS)
fs/ocfs2/dlm/dlmdebug.c, 332: get_zeroed_page in dlm_print_one_mle
fs/ocfs2/dlm/dlmmaster.c, 240: dlm_print_one_mle in __dlm_put_mle
fs/ocfs2/dlm/dlmmaster.c, 255: __dlm_put_mle in dlm_put_mle
fs/ocfs2/dlm/dlmmaster.c, 254: spin_lock in dlm_put_ml

[FUNC] get_zeroed_page(GFP_NOFS)
fs/ocfs2/dlm/dlmdebug.c, 332: get_zeroed_page in dlm_print_one_mle
fs/ocfs2/dlm/dlmmaster.c, 240: dlm_print_one_mle in __dlm_put_mle
fs/ocfs2/dlm/dlmmaster.c, 222: __dlm_put_mle in dlm_put_mle_inuse
fs/ocfs2/dlm/dlmmaster.c, 219: spin_lock in dlm_put_mle_inuse

To fix this bug, GFP_NOFS is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool DSAC.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jia-Ju Bai <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Joseph Qi <[email protected]>
Cc: Changwei Ge <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
fs/ocfs2/dlm/dlmdebug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index 825136070d2c1..73eaccea09b98 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -329,7 +329,7 @@ void dlm_print_one_mle(struct dlm_master_list_entry *mle)
{
char *buf;

- buf = (char *) get_zeroed_page(GFP_NOFS);
+ buf = (char *) get_zeroed_page(GFP_ATOMIC);
if (buf) {
dump_mle(mle, buf, PAGE_SIZE - 1);
free_page((unsigned long)buf);
--
2.20.1



2019-11-27 21:56:12

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 096/132] PCI: keystone: Use quirk to limit MRRS for K2G

From: Kishon Vijay Abraham I <[email protected]>

[ Upstream commit 148e340c0696369fadbbddc8f4bef801ed247d71 ]

PCI controller in K2G also has a limitation that memory read request
size (MRRS) must not exceed 256 bytes. Use the quirk to limit MRRS
(added for K2HK, K2L and K2E) for K2G as well.

Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/pci/host/pci-keystone.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index fb682e8af74d5..bdb808ba90d2a 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -42,6 +42,7 @@
#define PCIE_RC_K2HK 0xb008
#define PCIE_RC_K2E 0xb009
#define PCIE_RC_K2L 0xb00a
+#define PCIE_RC_K2G 0xb00b

#define to_keystone_pcie(x) container_of(x, struct keystone_pcie, pp)

@@ -56,6 +57,8 @@ static void quirk_limit_mrrs(struct pci_dev *dev)
.class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, },
{ PCI_DEVICE(PCI_VENDOR_ID_TI, PCIE_RC_K2L),
.class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, },
+ { PCI_DEVICE(PCI_VENDOR_ID_TI, PCIE_RC_K2G),
+ .class = PCI_CLASS_BRIDGE_PCI << 8, .class_mask = ~0, },
{ 0, },
};

--
2.20.1



2019-11-27 21:57:03

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 001/132] net/mlx4_en: fix mlx4 ethtool -N insertion

From: Luigi Rizzo <[email protected]>

[ Upstream commit 34e59836565e36fade1464e054a3551c1a0364be ]

ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
total number of entries in the rx classifier table. Surprisingly, mlx4
is missing this part (in principle ethtool could still move forward and
try the insert).

Tested: compiled and run command:
phh13:~# ethtool -N eth1 flow-type udp4 queue 4
Added rule with ID 255

Signed-off-by: Luigi Rizzo <[email protected]>
Reviewed-by: Tariq Toukan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -1667,6 +1667,7 @@ static int mlx4_en_get_rxnfc(struct net_
err = mlx4_en_get_flow(dev, cmd, cmd->fs.location);
break;
case ETHTOOL_GRXCLSRLALL:
+ cmd->data = MAX_NUM_OF_FS_RULES;
while ((!err || err == -ENOENT) && priority < cmd->rule_cnt) {
err = mlx4_en_get_flow(dev, cmd, i);
if (!err)


2019-11-27 22:06:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.4 060/132] sparc64: Rework xchg() definition to avoid warnings.

From: David S. Miller <[email protected]>

[ Upstream commit 6c2fc9cddc1ffdef8ada1dc8404e5affae849953 ]

Such as:

fs/ocfs2/file.c: In function ‘ocfs2_file_write_iter’:
./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value]
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))

and

drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c: In function ‘ixgbevf_xdp_setup’:
./arch/sparc/include/asm/cmpxchg_64.h:55:22: warning: value computed is not used [-Wunused-value]
#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))

Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
arch/sparc/include/asm/cmpxchg_64.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/sparc/include/asm/cmpxchg_64.h b/arch/sparc/include/asm/cmpxchg_64.h
index faa2f61058c27..92f0a46ace78e 100644
--- a/arch/sparc/include/asm/cmpxchg_64.h
+++ b/arch/sparc/include/asm/cmpxchg_64.h
@@ -40,7 +40,12 @@ static inline unsigned long xchg64(__volatile__ unsigned long *m, unsigned long
return val;
}

-#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
+#define xchg(ptr,x) \
+({ __typeof__(*(ptr)) __ret; \
+ __ret = (__typeof__(*(ptr))) \
+ __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))); \
+ __ret; \
+})

void __xchg_called_with_bad_pointer(void);

--
2.20.1



2019-11-28 10:57:46

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review


On 27/11/2019 20:29, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.204 release.
> There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> 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.204-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.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------

All tests are passing for Tegra ...

Test results for stable-v4.4:
6 builds: 6 pass, 0 fail
12 boots: 12 pass, 0 fail
19 tests: 19 pass, 0 fail

Linux version: 4.4.204-rc1-gd7e1aa334904
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra30-cardhu-a04

Cheers
Jon

--
nvpublic

2019-11-28 13:31:14

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On Thu, 28 Nov 2019 at 02:04, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 4.4.204 release.
> There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> 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.204-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.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 4.4.204-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.4.y
git commit: d7e1aa334904482d6133568d82815d712c9705b1
git describe: v4.4.203-133-gd7e1aa334904
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.4-oe/build/v4.4.203-133-gd7e1aa334904


No regressions (compared to build v4.4.203)

No fixes (compared to build v4.4.203)


Ran 20052 total tests in the following environments and test suites.

Environments
--------------
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* kvm-unit-tests
* ltp-containers-tests
* ltp-fs-tests
* network-basic-tests
* install-android-platform-tools-r2600
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* prep-tmp-disk
* ssuite

--
Linaro LKFT
https://lkft.linaro.org

2019-11-28 16:15:35

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On 11/27/19 12:29 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.204 release.
> There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> Anything received after that time might be too late.
>

Build results:
total: 170 pass: 170 fail: 0
Qemu test results:
total: 324 pass: 324 fail: 0

Guenter

2019-11-29 00:08:30

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On 11/27/19 1:29 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.204 release.
> There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> 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.204-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.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Boot failed. I am seeing the same panic on 4.14, 4.9, and 4.4 on my
system. I will bisect and let you know.

thanks,
-- Shuah

2019-11-29 08:57:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On Thu, Nov 28, 2019 at 06:59:17PM +0530, Naresh Kamboju wrote:
> On Thu, 28 Nov 2019 at 02:04, Greg Kroah-Hartman
> <[email protected]> wrote:
> >
> > This is the start of the stable review cycle for the 4.4.204 release.
> > There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> > 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.204-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.4.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
>
> Results from Linaro’s test farm.
> No regressions on arm64, arm, x86_64, and i386.

As you all are doing run-time tests, it would be interesting to see why
I saw failures in the Android networking tests with this and the 4.9
queue, but they did not show up in your testing :(

thanks,

greg k-h

2019-12-03 05:26:37

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On 11/29/19 12:53 AM, Greg Kroah-Hartman wrote:
> On Thu, Nov 28, 2019 at 06:59:17PM +0530, Naresh Kamboju wrote:
>> On Thu, 28 Nov 2019 at 02:04, Greg Kroah-Hartman
>> <[email protected]> wrote:
>>>
>>> This is the start of the stable review cycle for the 4.4.204 release.
>>> There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
>>> 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.204-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.4.y
>>> and the diffstat can be found below.
>>>
>>> thanks,
>>>
>>> greg k-h
>>>
>>
>> Results from Linaro’s test farm.
>> No regressions on arm64, arm, x86_64, and i386.
>
> As you all are doing run-time tests, it would be interesting to see why
> I saw failures in the Android networking tests with this and the 4.9
> queue, but they did not show up in your testing :(
>

Did you solve this problem, or am I going to get into trouble when I merge this
release ?

Guenter

2019-12-03 06:37:03

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On Mon, Dec 02, 2019 at 09:25:55PM -0800, Guenter Roeck wrote:
> On 11/29/19 12:53 AM, Greg Kroah-Hartman wrote:
> > On Thu, Nov 28, 2019 at 06:59:17PM +0530, Naresh Kamboju wrote:
> > > On Thu, 28 Nov 2019 at 02:04, Greg Kroah-Hartman
> > > <[email protected]> wrote:
> > > >
> > > > This is the start of the stable review cycle for the 4.4.204 release.
> > > > There are 132 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 Fri, 29 Nov 2019 20:18:09 +0000.
> > > > 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.204-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.4.y
> > > > and the diffstat can be found below.
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > > >
> > >
> > > Results from Linaro’s test farm.
> > > No regressions on arm64, arm, x86_64, and i386.
> >
> > As you all are doing run-time tests, it would be interesting to see why
> > I saw failures in the Android networking tests with this and the 4.9
> > queue, but they did not show up in your testing :(
> >
>
> Did you solve this problem, or am I going to get into trouble when I merge this
> release ?

This was resolved with the 4.4.205 and 4.9.205 releases.

thanks,

greg k-h

2019-12-03 18:59:06

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 4.4 000/132] 4.4.204-stable review

On Tue, Dec 03, 2019 at 07:36:16AM +0100, Greg Kroah-Hartman wrote:
[ ... ]

> > >
> > > As you all are doing run-time tests, it would be interesting to see why
> > > I saw failures in the Android networking tests with this and the 4.9
> > > queue, but they did not show up in your testing :(
> > >
> >
> > Did you solve this problem, or am I going to get into trouble when I merge this
> > release ?
>
> This was resolved with the 4.4.205 and 4.9.205 releases.
>
Thanks!

Guenter