[PATCH 4.9 73/83] fuse: fallocate: fix return with locked inode

2019-06-09 Thread Greg Kroah-Hartman
From: Miklos Szeredi commit 35d6fcbb7c3e296a52136347346a698a35af3fda upstream. Do the proper cleanup in case the size check fails. Tested with xfstests:generic/228 Reported-by: kbuild test robot Reported-by: Dan Carpenter Fixes: 0cbade024ba5 ("fuse: honor RLIMIT_FSIZE in

[PATCH 4.9 72/83] parisc: Use implicit space register selection for loading the coherence index of I/O pdirs

2019-06-09 Thread Greg Kroah-Hartman
From: John David Anglin commit 63923d2c3800919774f5c651d503d1dd2adaddd5 upstream. We only support I/O to kernel space. Using %sr1 to load the coherence index may be racy unless interrupts are disabled. This patch changes the code used to load the coherence index to use implicit space register

[PATCH 4.9 68/83] ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

2019-06-09 Thread Greg Kroah-Hartman
From: Olivier Matz [ Upstream commit 59e3e4b52663a9d97efbce7307f62e4bc5c9ce91 ] As it was done in commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") and commit 20b50d79974e ("net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()") for ipv4, copy the

[PATCH 4.9 54/83] fs: prevent page refcount overflow in pipe_buf_get

2019-06-09 Thread Greg Kroah-Hartman
From: Matthew Wilcox commit 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb upstream. Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All

[PATCH 4.9 50/83] brcmfmac: assure SSID length from firmware is limited

2019-06-09 Thread Greg Kroah-Hartman
From: Arend van Spriel commit 1b5e2423164b3670e8bc9174e4762d297990deff upstream. The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin

[PATCH 4.9 53/83] binder: replace "%p" with "%pK"

2019-06-09 Thread Greg Kroah-Hartman
From: Todd Kjos commit 8ca86f1639ec5890d400fff9211aca22d0a392eb upstream. The format specifier "%p" can leak kernel addresses. Use "%pK" instead. There were 4 remaining cases in binder.c. Signed-off-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 4.9: adjust context]

[PATCH 4.9 27/83] USB: sisusbvga: fix oops in error path of sisusb_probe

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 9a5729f68d3a82786aea110b1bfe610be318f80a upstream. The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum Reported-by:

[PATCH 4.9 24/83] usbip: usbip_host: fix BUG: sleeping function called from invalid context

2019-06-09 Thread Greg Kroah-Hartman
From: Shuah Khan commit 0c9e8b3cad654bfc499c10b652fbf8f0b890af8f upstream. stub_probe() and stub_disconnect() call functions which could call sleeping function in invalid context whil holding busid_lock. Fix the problem by refining the lock holds to short critical sections to change the

[PATCH 4.9 55/83] mm, gup: remove broken VM_BUG_ON_PAGE compound check for hugepages

2019-06-09 Thread Greg Kroah-Hartman
From: Will Deacon commit a3e328556d41bb61c55f9dfcc62d6a826ea97b85 upstream. When operating on hugepages with DEBUG_VM enabled, the GUP code checks the compound head for each tail page prior to calling page_cache_add_speculative. This is broken, because on the fast-GUP path (where we don't hold

[PATCH 4.9 29/83] USB: rio500: refuse more than one device at a time

2019-06-09 Thread Greg Kroah-Hartman
From: Oliver Neukum commit 3864d33943b4a76c6e64616280e98d2410b1190f upstream. This driver is using a global variable. It cannot handle more than one device at a time. The issue has been existing since the dawn of the driver. Signed-off-by: Oliver Neukum Reported-by:

[PATCH 4.9 26/83] USB: Fix slab-out-of-bounds write in usb_get_bos_descriptor

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit a03ff54460817c76105f81f3aa8ef655759ccc9a upstream. The syzkaller USB fuzzer found a slab-out-of-bounds write bug in the USB core, caused by a failure to check the actual size of a BOS descriptor. This patch adds a check to make sure the descriptor is at least as large

[PATCH 4.9 21/83] xhci: Use %zu for printing size_t type

2019-06-09 Thread Greg Kroah-Hartman
From: Fabio Estevam commit c1a145a3ed9a40f3b6145feb97789e8eb49c5566 upstream. Commit 597c56e372da ("xhci: update bounce buffer with correct sg num") caused the following build warnings: drivers/usb/host/xhci-ring.c:676:19: warning: format '%ld' expects argument of type 'long int', but

[PATCH 4.9 49/83] brcmfmac: add length checks in scheduled scan result handler

2019-06-09 Thread Greg Kroah-Hartman
From: Arend Van Spriel commit 4835f37e3bafc138f8bfa3cbed2920dd56fed283 upstream. Assure the event data buffer is long enough to hold the array of netinfo items and that SSID length does not exceed the maximum of 32 characters as per 802.11 spec. Reviewed-by: Hante Meuleman Reviewed-by:

[PATCH 4.9 25/83] usbip: usbip_host: fix stub_dev lock context imbalance regression

2019-06-09 Thread Greg Kroah-Hartman
From: Shuah Khan commit 3ea3091f1bd8586125848c62be295910e9802af0 upstream. Fix the following sparse context imbalance regression introduced in a patch that fixed sleeping function called from invalid context bug. kbuild test robot reported on: tree/branch:

[PATCH 4.9 46/83] CIFS: cifs_read_allocate_pages: dont iterate through whole page array on ENOMEM

2019-06-09 Thread Greg Kroah-Hartman
From: Roberto Bergantinos Corpas commit 31fad7d41e73731f05b8053d17078638cf850fa6 upstream. In cifs_read_allocate_pages, in case of ENOMEM, we go through whole rdata->pages array but we have failed the allocation before nr_pages, therefore we may end up calling put_page with NULL pointer,

[PATCH 4.9 36/83] Btrfs: fix race updating log root item during fsync

2019-06-09 Thread Greg Kroah-Hartman
From: Filipe Manana commit 06989c799f04810f6876900d4760c0edda369cf7 upstream. When syncing the log, the final phase of a fsync operation, we need to either create a log root's item or update the existing item in the log tree of log roots, and that depends on the current value of the log root's

[PATCH 4.9 38/83] ALSA: hda/realtek - Set default power save node to 0

2019-06-09 Thread Greg Kroah-Hartman
From: Kailang Yang commit 317d9313925cd8388304286c0d3c8dda7f060a2d upstream. I measured power consumption between power_save_node=1 and power_save_node=0. It's almost the same. Codec will enter to runtime suspend and suspend. That pin also will enter to D3. Don't need to enter to D3 by single

[PATCH 4.9 23/83] usb: xhci: avoid null pointer deref when bos field is NULL

2019-06-09 Thread Greg Kroah-Hartman
From: Carsten Schmid commit 7aa1bb2ffd84d6b9b5f546b079bb15cd0ab6e76e upstream. With defective USB sticks we see the following error happen: usb 1-3: new high-speed USB device number 6 using xhci_hcd usb 1-3: device descriptor read/64, error -71 usb 1-3: device descriptor read/64, error -71 usb

[PATCH 4.9 00/83] 4.9.181-stable review

2019-06-09 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.181 release. There are 83 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 Tue 11 Jun 2019 04:39:58 PM UTC. Anything

[PATCH 4.9 39/83] drm/nouveau/i2c: Disable i2c bus access after ->fini()

2019-06-09 Thread Greg Kroah-Hartman
From: Lyude Paul commit 342406e4fbba9a174125fbfe6aeac3d64ef90f76 upstream. For a while, we've had the problem of i2c bus access not grabbing a runtime PM ref when it's being used in userspace by i2c-dev, resulting in nouveau spamming the kernel log with errors if anything attempts to access the

[PATCH 4.9 09/83] ipv4/igmp: fix another memory leak in igmpv3_del_delrec()

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 3580d04aa674383c42de7b635d28e52a1e5bc72c ] syzbot reported memory leaks [1] that I have back tracked to a missing cleanup from igmpv3_del_delrec() when (im->sfmode != MCAST_INCLUDE) Add ip_sf_list_clear_all() and kfree_pmc() helpers to explicitely handle

[PATCH 4.9 22/83] xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()

2019-06-09 Thread Greg Kroah-Hartman
From: Andrey Smirnov commit f7fac17ca925faa03fc5eb854c081a24075f8bad upstream. Xhci_handshake() implements the algorithm already captured by readl_poll_timeout_atomic(). Convert the former to use the latter to avoid repetition. Turned out this patch also fixes a bug on the AMD Stoneyridge

Re: [PATCH 2/2] Input: synaptics-rmi4 - export nosleep of f01 via sysfs

2019-06-09 Thread Dmitry Torokhov
Hi Aaron, On Wed, Feb 20, 2019 at 05:42:00PM +0100, Aaron Ma wrote: > Some of ThinkPad X1C6 touchpads didn't wakeup after resume. > Forcing enable nosleep make touchpad back. > Add nosleep via sysfs, so user can control it to workaround issue. > > /sys/devices/rmi4-00/nosleep can be written

[PATCH 4.9 43/83] kernel/signal.c: trace_signal_deliver when signal_group_exit

2019-06-09 Thread Greg Kroah-Hartman
From: Zhenliang Wei commit 98af37d624ed8c83f1953b1b6b2f6866011fc064 upstream. In the fixes commit, removing SIGKILL from each thread signal mask and executing "goto fatal" directly will skip the call to "trace_signal_deliver". At this point, the delivery tracking of the SIGKILL signal will be

[PATCH 4.9 44/83] docs: Fix conf.py for Sphinx 2.0

2019-06-09 Thread Greg Kroah-Hartman
From: Jonathan Corbet commit 3bc8088464712fdcb078eefb68837ccfcc413c88 upstream. Our version check in Documentation/conf.py never envisioned a world where Sphinx moved beyond 1.x. Now that the unthinkable has happened, fix our version check to handle higher version numbers correctly. Cc:

[PATCH 4.9 41/83] tty: max310x: Fix external crystal register setup

2019-06-09 Thread Greg Kroah-Hartman
From: Joe Burmeister commit 5d24f455c182d5116dd5db8e1dc501115ecc9c2c upstream. The datasheet states: Bit 4: ClockEnSet the ClockEn bit high to enable an external clocking (crystal or clock generator at XIN). Set the ClockEn bit to 0 to disable clocking Bit 1: CrystalEnSet the CrystalEn bit

[PATCH 4.9 40/83] tty: serial: msm_serial: Fix XON/XOFF

2019-06-09 Thread Greg Kroah-Hartman
From: Jorge Ramirez-Ortiz commit 61c0e37950b88bad590056286c1d766b1f167f4e upstream. When the tty layer requests the uart to throttle, the current code executing in msm_serial will trigger "Bad mode in Error Handler" and generate an invalid stack frame in pstore before rebooting (that is if

[PATCH 4.9 35/83] scsi: zfcp: fix to prevent port_remove with pure auto scan LUNs (only sdevs)

2019-06-09 Thread Greg Kroah-Hartman
From: Steffen Maier commit ef4021fe5fd77ced0323cede27979d80a56211ca upstream. When the user tries to remove a zfcp port via sysfs, we only rejected it if there are zfcp unit children under the port. With purely automatically scanned LUNs there are no zfcp units but only SCSI devices. In such

[PATCH 4.9 33/83] media: smsusb: better handle optional alignment

2019-06-09 Thread Greg Kroah-Hartman
From: Mauro Carvalho Chehab commit a47686636d84eaec5c9c6e84bd5f96bed34d526d upstream. Most Siano devices require an alignment for the response. Changeset f3be52b0056a ("media: usb: siano: Fix general protection fault in smsusb") changed the logic with gets such aligment, but it now produces a

[PATCH 4.9 32/83] media: usb: siano: Fix false-positive "uninitialized variable" warning

2019-06-09 Thread Greg Kroah-Hartman
From: Alan Stern commit 45457c01171fd1488a7000d1751c06ed8560ee38 upstream. GCC complains about an apparently uninitialized variable recently added to smsusb_init_device(). It's a false positive, but to silence the warning this patch adds a trivial initialization. Signed-off-by: Alan Stern

[PATCH 4.9 04/83] net-gro: fix use-after-free read in napi_gro_frags()

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit a4270d6795b0580287453ea55974d948393e66ef ] If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might

[PATCH 4.9 03/83] net: fec: fix the clk mismatch in failed_reset path

2019-06-09 Thread Greg Kroah-Hartman
From: Andy Duan [ Upstream commit ce8d24f9a5965a58c588f9342689702a1024433c ] Fix the clk mismatch in the error path "failed_reset" because below error path will disable clk_ahb and clk_ipg directly, it should use pm_runtime_put_noidle() instead of pm_runtime_put() to avoid to call runtime

[PATCH 4.9 19/83] include/linux/bitops.h: sanitize rotate primitives

2019-06-09 Thread Greg Kroah-Hartman
From: Rasmus Villemoes commit ef4d6f6b275c498f8e5626c99dbeefdc5027f843 upstream. The ror32 implementation (word >> shift) | (word << (32 - shift) has undefined behaviour if shift is outside the [1, 31] range. Similarly for the 64 bit variants. Most callers pass a compile-time constant

[PATCH 4.9 08/83] bnxt_en: Fix aggregation buffer leak under OOM condition.

2019-06-09 Thread Greg Kroah-Hartman
From: Michael Chan [ Upstream commit 296d5b54163964b7ae536b8b57dfbd21d4e868e1 ] For every RX packet, the driver replenishes all buffers used for that packet and puts them back into the RX ring and RX aggregation ring. In one code path where the RX packet has one RX buffer and one or more

[PATCH 4.9 06/83] usbnet: fix kernel crash after disconnect

2019-06-09 Thread Greg Kroah-Hartman
From: Kloetzke Jan [ Upstream commit ad70411a978d1e6e97b1e341a7bde9a79af0c93d ] When disconnecting cdc_ncm the kernel sporadically crashes shortly after the disconnect: [ 57.868812] Unable to handle kernel NULL pointer dereference at virtual address ... [ 58.006653] PC is

[PATCH 4.9 02/83] llc: fix skb leak in llc_build_and_send_ui_pkt()

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 8fb44d60d4142cd2a440620cd291d346e23c131e ] If llc_mac_hdr_init() returns an error, we must drop the skb since no llc_build_and_send_ui_pkt() caller will take care of this. BUG: memory leak unreferenced object 0x8881202b6800 (size 2048): comm

[PATCH 4.9 05/83] net: stmmac: fix reset gpio free missing

2019-06-09 Thread Greg Kroah-Hartman
From: Jisheng Zhang [ Upstream commit 49ce881c0d4c4a7a35358d9dccd5f26d0e56fc61 ] Commit 984203ceff27 ("net: stmmac: mdio: remove reset gpio free") removed the reset gpio free, when the driver is unbinded or rmmod, we miss the gpio free. This patch uses managed API to request the reset gpio, so

[PATCH 4.9 20/83] xhci: update bounce buffer with correct sg num

2019-06-09 Thread Greg Kroah-Hartman
From: Henry Lin commit 597c56e372dab2c7f79b8d700aad3a5deebf9d1b upstream. This change fixes a data corruption issue occurred on USB hard disk for the case that bounce buffer is used during transferring data. While updating data between sg list and bounce buffer, current implementation passes

[PATCH 4.9 16/83] Revert "tipc: fix modprobe tipc failed after switch order of device registration"

2019-06-09 Thread Greg Kroah-Hartman
From: David S. Miller commit 5593530e56943182ebb6d81eca8a3be6db6dbba4 upstream. This reverts commit 532b0f7ece4cb2ffd24dc723ddf55242d1188e5e. More revisions coming up. Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/tipc/core.c | 14 +++--- 1 file

[PATCH 4.9 13/83] net: mvpp2: fix bad MVPP2_TXQ_SCHED_TOKEN_CNTR_REG queue value

2019-06-09 Thread Greg Kroah-Hartman
From: Antoine Tenart [ Upstream commit 21808437214637952b61beaba6034d97880fbeb3 ] MVPP2_TXQ_SCHED_TOKEN_CNTR_REG() expects the logical queue id but the current code is passing the global tx queue offset, so it ends up writing to unknown registers (between 0x8280 and 0x82fc, which seemed to be

[PATCH 4.14 24/35] genwqe: Prevent an integer overflow in the ioctl

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 110080cea0d0e4dfdb0b536e7f8a5633ead6a781 upstream. There are a couple potential integer overflows here. round_up(m->size + (m->addr & ~PAGE_MASK), PAGE_SIZE); The first thing is that the "m->size + (...)" addition could overflow, and the second is that

[PATCH 4.14 22/35] MIPS: pistachio: Build uImage.gz by default

2019-06-09 Thread Greg Kroah-Hartman
From: Paul Burton commit e4f2d1af7163becb181419af9dece9206001e0a6 upstream. The pistachio platform uses the U-Boot bootloader & generally boots a kernel in the uImage format. As such it's useful to build one when building the kernel, but to do so currently requires the user to manually specify

[PATCH 4.9 11/83] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT

2019-06-09 Thread Greg Kroah-Hartman
From: Rasmus Villemoes [ Upstream commit 84b3fd1fc9592d431e23b077e692fa4e3fd0f086 ] Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends up in bits 47:32 of the return value, instead of bits 31:16 as they should. Fixes: 6e46e2d821bb ("net: dsa: mv88e6xxx: Fix u64 statistics")

[PATCH 4.9 10/83] ipv4/igmp: fix build error if !CONFIG_IP_MULTICAST

2019-06-09 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 903869bd10e6719b9df6718e785be7ec725df59f ] ip_sf_list_clear_all() needs to be defined even if !CONFIG_IP_MULTICAST Fixes: 3580d04aa674 ("ipv4/igmp: fix another memory leak in igmpv3_del_delrec()") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot

[PATCH 4.9 12/83] net: mvneta: Fix err code path of probe

2019-06-09 Thread Greg Kroah-Hartman
From: Jisheng Zhang [ Upstream commit d484e06e25ebb937d841dac02ac1fe76ec7d4ddd ] Fix below issues in err code path of probe: 1. we don't need to unregister_netdev() because the netdev isn't registered. 2. when register_netdev() fails, we also need to destroy bm pool for HWBM case. Fixes:

[PATCH 4.14 20/35] i2c: xiic: Add max_read_len quirk

2019-06-09 Thread Greg Kroah-Hartman
From: Robert Hancock commit 49b809586730a77b57ce620b2f9689de765d790b upstream. This driver does not support reading more than 255 bytes at once because the register for storing the number of bytes to read is only 8 bits. Add a max_read_len quirk to enforce this. This was found when using this

[PATCH 4.14 21/35] MIPS: Bounds check virt_addr_valid

2019-06-09 Thread Greg Kroah-Hartman
From: Paul Burton commit 074a1e1167afd82c26f6d03a9a8b997d564bb241 upstream. The virt_addr_valid() function is meant to return true iff virt_to_page() will return a valid struct page reference. This is true iff the address provided is found within the unmapped address range between PAGE_OFFSET &

[PATCH 4.14 05/35] net: rds: fix memory leak in rds_ib_flush_mr_pool

2019-06-09 Thread Greg Kroah-Hartman
From: Zhu Yanjun [ Upstream commit 85cb928787eab6a2f4ca9d2a798b6f3bed53ced1 ] When the following tests last for several hours, the problem will occur. Server: rds-stress -r 1.1.1.16 -D 1M Client: rds-stress -r 1.1.1.14 -s 1.1.1.16 -D 1M -T 30 The following will occur. " Starting

[PATCH 4.14 33/35] qmi_wwan: Add quirk for Quectel dynamic config

2019-06-09 Thread Greg Kroah-Hartman
From: Kristian Evensen commit e4bf63482c309287ca84d91770ffa7dcc18e37eb upstream. Most, if not all, Quectel devices use dynamic interface numbers, and users are able to change the USB configuration at will. Matching on for example interface number is therefore not possible. Instead, the QMI

[PATCH 4.14 34/35] fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock

2019-06-09 Thread Greg Kroah-Hartman
From: Kirill Smelkov commit 10dce8af34226d90fa56746a934f8da5dcdba3df upstream. Commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX") added locking for file.f_pos access and in particular made concurrent read and write not possible - now both those functions take f_pos lock for the

[PATCH 4.14 18/35] pstore/ram: Run without kernel crash dump region

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit 8880fa32c557600f5f624084152668ed3c2ea51e upstream. The ram pstore backend has always had the crash dumper frontend enabled unconditionally. However, it was possible to effectively disable it by setting a record_size=0. All the machinery would run (storing dumps to the

[PATCH 4.14 17/35] pstore: Convert buf_lock to semaphore

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit ea84b580b95521644429cc6748b6c2bf27c8b0f3 upstream. Instead of running with interrupts disabled, use a semaphore. This should make it easier for backends that may need to sleep (e.g. EFI) when performing a write: |BUG: sleeping function called from invalid context at

[PATCH 4.14 09/35] net: sfp: read eeprom in maximum 16 byte increments

2019-06-09 Thread Greg Kroah-Hartman
From: Russell King [ Upstream commit 28e74a7cfd6403f0d1c0f8b10b45d6fae37b227e ] Some SFP modules do not like reads longer than 16 bytes, so read the EEPROM in chunks of 16 bytes at a time. This behaviour is not specified in the SFP MSAs, which specifies: "The serial interface uses the 2-wire

[PATCH 4.14 31/35] drm/i915/fbc: disable framebuffer compression on GeminiLake

2019-06-09 Thread Greg Kroah-Hartman
From: Daniel Drake commit 396dd8143bdd94bd1c358a228a631c8c895a1126 upstream. On many (all?) the Gemini Lake systems we work with, there is frequent momentary graphical corruption at the top of the screen, and it seems that disabling framebuffer compression can avoid this. The ticket was

[PATCH 4.14 30/35] drm/i915: Fix I915_EXEC_RING_MASK

2019-06-09 Thread Greg Kroah-Hartman
From: Chris Wilson commit d90c06d57027203f73021bb7ddb30b800d65c636 upstream. This was supposed to be a mask of all known rings, but it is being used by execbuffer to filter out invalid rings, and so is instead mapping high unused values onto valid rings. Instead of a mask of all known rings, we

[PATCH 4.14 25/35] test_firmware: Use correct snprintf() limit

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit bd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d upstream. The limit here is supposed to be how much of the page is left, but it's just using PAGE_SIZE as the limit. The other thing to remember is that snprintf() returns the number of bytes which would have been copied if we

[PATCH 4.14 19/35] x86/power: Fix nosmt vs hibernation triple fault during resume

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Kosina commit ec527c318036a65a083ef68d8ba95789d2212246 upstream. As explained in 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once") we always, no matter what, have to bring up x86 HT siblings during boot at least once in order to avoid first MCE bringing the

[PATCH 4.14 08/35] ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

2019-06-09 Thread Greg Kroah-Hartman
From: Olivier Matz [ Upstream commit 59e3e4b52663a9d97efbce7307f62e4bc5c9ce91 ] As it was done in commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") and commit 20b50d79974e ("net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()") for ipv4, copy the

[PATCH 4.14 00/35] 4.14.125-stable review

2019-06-09 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.125 release. There are 35 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 Tue 11 Jun 2019 04:40:01 PM UTC. Anything

[PATCH 4.14 26/35] drm/gma500/cdv: Check vbt config bits when detecting lvds panels

2019-06-09 Thread Greg Kroah-Hartman
From: Patrik Jakobsson commit 7c420636860a719049fae9403e2c87804f53bdde upstream. Some machines have an lvds child device in vbt even though a panel is not attached. To make detection more reliable we now also check the lvds config bits available in the vbt. Bugzilla:

[PATCH 4.14 11/35] Revert "fib_rules: fix error in backport of e9919a24d302 ("fib_rules: return 0...")"

2019-06-09 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit 691306ebd18f945e44b4552a4bfcca3475e5d957 as the patch that this "fixes" is about to be reverted... Signed-off-by: Greg Kroah-Hartman --- net/core/fib_rules.c |1 - 1 file changed, 1 deletion(-) --- a/net/core/fib_rules.c +++

[PATCH 4.14 04/35] net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query

2019-06-09 Thread Greg Kroah-Hartman
From: Erez Alfasi [ Upstream commit 135dd9594f127c8a82d141c3c8430e9e2143216a ] Querying EEPROM high pages data for SFP module is currently not supported by our driver but is still tried, resulting in invalid FW queries. Set the EEPROM ethtool data length to 256 for SFP module to limit the

[PATCH 4.14 13/35] rcu: locking and unlocking need to always be at least barriers

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 66be4e66a7f422128748e3c3ef6ee72b20a6197b upstream. Herbert Xu pointed out that commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") was incorrect in making the preempt_disable/enable() be conditional on CONFIG_PREEMPT_COUNT. If

[PATCH 4.14 14/35] parisc: Use implicit space register selection for loading the coherence index of I/O pdirs

2019-06-09 Thread Greg Kroah-Hartman
From: John David Anglin commit 63923d2c3800919774f5c651d503d1dd2adaddd5 upstream. We only support I/O to kernel space. Using %sr1 to load the coherence index may be racy unless interrupts are disabled. This patch changes the code used to load the coherence index to use implicit space register

[PATCH 4.14 02/35] Fix memory leak in sctp_process_init

2019-06-09 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit 0a8dd9f67cd0da7dc284f48b032ce00db1a68791 ] syzbot found the following leak in sctp_process_init BUG: memory leak unreferenced object 0x88810ef68400 (size 1024): comm "syz-executor273", pid 7046, jiffies 4294945598 (age 28.770s) hex dump (first 32

[PATCH 4.14 03/35] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-06-09 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60 ] Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not updated to use the altered key. The result is that every packet Tx does a

[PATCH 4.19 44/51] drm/amdgpu: remove ATPX_DGPU_REQ_POWER_FOR_DISPLAYS check when hotplug-in

2019-06-09 Thread Greg Kroah-Hartman
From: Aaron Liu commit bdb1ccb080dafc1b4224873a5b759ff85a7d1c10 upstream. In amdgpu_atif_handler, when hotplug event received, remove ATPX_DGPU_REQ_POWER_FOR_DISPLAYS check. This bit's check will cause missing system resume. Signed-off-by: Aaron Liu Reviewed-by: Alex Deucher Signed-off-by:

[PATCH 4.19 43/51] drm/radeon: prefer lower reference dividers

2019-06-09 Thread Greg Kroah-Hartman
From: Christian König commit 2e26ccb119bde03584be53406bbd22e711b0d6e6 upstream. Instead of the closest reference divider prefer the lowest, this fixes flickering issues on HP Compaq nx9420. Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514 Suggested-by: Paul Dufresne Signed-off-by:

[PATCH 4.14 10/35] ipv6: fix the check before getting the cookie in rt6_get_cookie

2019-06-09 Thread Greg Kroah-Hartman
From: Xin Long [ Upstream commit b7999b07726c16974ba9ca3bb9fe98ecbec5f81c ] In Jianlin's testing, netperf was broken with 'Connection reset by peer', as the cookie check failed in rt6_check() and ip6_dst_check() always returned NULL. It's caused by Commit 93531c674315 ("net/ipv6: separate

[PATCH 4.14 01/35] ethtool: fix potential userspace buffer overflow

2019-06-09 Thread Greg Kroah-Hartman
From: Vivien Didelot [ Upstream commit 0ee4e76937d69128a6a66861ba393ebdc2ffc8a2 ] ethtool_get_regs() allocates a buffer of size ops->get_regs_len(), and pass it to the kernel driver via ops->get_regs() for filling. There is no restriction about what the kernel drivers can or cannot do with the

[PATCH 4.19 36/51] test_firmware: Use correct snprintf() limit

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit bd17cc5a20ae9aaa3ed775f360b75ff93cd66a1d upstream. The limit here is supposed to be how much of the page is left, but it's just using PAGE_SIZE as the limit. The other thing to remember is that snprintf() returns the number of bytes which would have been copied if we

[PATCH 4.19 40/51] drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)

2019-06-09 Thread Greg Kroah-Hartman
From: Dave Airlie commit b30a43ac7132cdda833ac4b13dd1ebd35ace14b7 upstream. There was a nouveau DDX that relied on legacy context ioctls to work, but we fixed it years ago, give distros that have a modern DDX the option to break the uAPI and close the mess of holes that legacy context support

[PATCH 4.19 46/51] drm/amdgpu/soc15: skip reset on init

2019-06-09 Thread Greg Kroah-Hartman
From: Alex Deucher commit 5887a59961e2295c5b02f39dbc0ecf9212709b7b upstream. Not necessary on soc15 and breaks driver reload on server cards. Acked-by: Amber Lin Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/soc15.c

[PATCH 4.19 48/51] drm/i915: Maintain consistent documentation subsection ordering

2019-06-09 Thread Greg Kroah-Hartman
From: Jonathan Corbet commit 551bd3368a7b3cfef01edaade8970948d178d40a upstream. With Sphinx 2.0 (or prior versions with the deprecation warnings fixed) the docs build fails with: Documentation/gpu/i915.rst:403: WARNING: Title level inconsistent: Global GTT Fence Handling

[PATCH 4.19 10/51] net: sfp: read eeprom in maximum 16 byte increments

2019-06-09 Thread Greg Kroah-Hartman
From: Russell King [ Upstream commit 28e74a7cfd6403f0d1c0f8b10b45d6fae37b227e ] Some SFP modules do not like reads longer than 16 bytes, so read the EEPROM in chunks of 16 bytes at a time. This behaviour is not specified in the SFP MSAs, which specifies: "The serial interface uses the 2-wire

[PATCH 4.19 02/51] Fix memory leak in sctp_process_init

2019-06-09 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit 0a8dd9f67cd0da7dc284f48b032ce00db1a68791 ] syzbot found the following leak in sctp_process_init BUG: memory leak unreferenced object 0x88810ef68400 (size 1024): comm "syz-executor273", pid 7046, jiffies 4294945598 (age 28.770s) hex dump (first 32

[PATCH 4.19 38/51] drm/msm: fix fb references in async update

2019-06-09 Thread Greg Kroah-Hartman
From: Helen Koike commit 474d952b4870cfbdc55d3498f4d498775fe77e81 upstream. Async update callbacks are expected to set the old_fb in the new_state so prepare/cleanup framebuffers are balanced. Cc: # v4.14+ Fixes: 224a4c970987 ("drm/msm: update cursors asynchronously through atomic")

[PATCH 4.19 50/51] drm/i915/gvt: Initialize intel_gvt_gtt_entry in stack

2019-06-09 Thread Greg Kroah-Hartman
From: Tina Zhang commit 387a4c2b55291b37e245c840813bd8a8bd06ed49 upstream. Stack struct intel_gvt_gtt_entry value needs to be initialized before being used, as the fields may contain garbage values. W/o this patch, set_ggtt_entry prints: - 274.046840:

[PATCH 4.19 37/51] drm/gma500/cdv: Check vbt config bits when detecting lvds panels

2019-06-09 Thread Greg Kroah-Hartman
From: Patrik Jakobsson commit 7c420636860a719049fae9403e2c87804f53bdde upstream. Some machines have an lvds child device in vbt even though a panel is not attached. To make detection more reliable we now also check the lvds config bits available in the vbt. Bugzilla:

[PATCH 4.19 11/51] net/tls: replace the sleeping lock around RX resync with a bit lock

2019-06-09 Thread Greg Kroah-Hartman
From: Jakub Kicinski [ Upstream commit e52972c11d6b1262964db96d65934196db621685 ] Commit 38030d7cb779 ("net/tls: avoid NULL-deref on resync during device removal") tried to fix a potential NULL-dereference by taking the context rwsem. Unfortunately the RX resync may get called from soft IRQ,

[PATCH 4.19 32/51] MIPS: Bounds check virt_addr_valid

2019-06-09 Thread Greg Kroah-Hartman
From: Paul Burton commit 074a1e1167afd82c26f6d03a9a8b997d564bb241 upstream. The virt_addr_valid() function is meant to return true iff virt_to_page() will return a valid struct page reference. This is true iff the address provided is found within the unmapped address range between PAGE_OFFSET &

[PATCH 4.19 25/51] pstore: Set tfm to NULL on free_buf_for_compression

2019-06-09 Thread Greg Kroah-Hartman
From: Pi-Hsun Shih commit a9fb94a99bb515d8720ba8440ce3aba84aec80f8 upstream. Set tfm to NULL on free_buf_for_compression() after crypto_free_comp(). This avoid a use-after-free when allocate_buf_for_compression() and free_buf_for_compression() are called twice. Although

[PATCH 4.19 26/51] pstore/ram: Run without kernel crash dump region

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit 8880fa32c557600f5f624084152668ed3c2ea51e upstream. The ram pstore backend has always had the crash dumper frontend enabled unconditionally. However, it was possible to effectively disable it by setting a record_size=0. All the machinery would run (storing dumps to the

[PATCH 4.19 05/51] neighbor: Call __ipv4_neigh_lookup_noref in neigh_xmit

2019-06-09 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 4b2a2bfeb3f056461a90bd621e8bd7d03fa47f60 ] Commit cd9ff4de0107 changed the key for IFF_POINTOPOINT devices to INADDR_ANY but neigh_xmit which is used for MPLS encapsulations was not updated to use the altered key. The result is that every packet Tx does a

[PATCH 4.19 27/51] x86/power: Fix nosmt vs hibernation triple fault during resume

2019-06-09 Thread Greg Kroah-Hartman
From: Jiri Kosina commit ec527c318036a65a083ef68d8ba95789d2212246 upstream. As explained in 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once") we always, no matter what, have to bring up x86 HT siblings during boot at least once in order to avoid first MCE bringing the

[PATCH 4.19 35/51] genwqe: Prevent an integer overflow in the ioctl

2019-06-09 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 110080cea0d0e4dfdb0b536e7f8a5633ead6a781 upstream. There are a couple potential integer overflows here. round_up(m->size + (m->addr & ~PAGE_MASK), PAGE_SIZE); The first thing is that the "m->size + (...)" addition could overflow, and the second is that

[PATCH 4.19 33/51] MIPS: pistachio: Build uImage.gz by default

2019-06-09 Thread Greg Kroah-Hartman
From: Paul Burton commit e4f2d1af7163becb181419af9dece9206001e0a6 upstream. The pistachio platform uses the U-Boot bootloader & generally boots a kernel in the uImage format. As such it's useful to build one when building the kernel, but to do so currently requires the user to manually specify

[PATCH 4.19 30/51] s390/mm: fix address space detection in exception handling

2019-06-09 Thread Greg Kroah-Hartman
From: Gerald Schaefer commit 962f0af83c239c0aef05639631e871c874b00f99 upstream. Commit 0aaba41b58bc ("s390: remove all code using the access register mode") removed access register mode from the kernel, and also from the address space detection logic. However, user space could still switch to

[PATCH 4.19 08/51] net: mvpp2: Use strscpy to handle stat strings

2019-06-09 Thread Greg Kroah-Hartman
From: Maxime Chevallier [ Upstream commit d37acd5aa99c57505b64913e0e2624ec3daed8c5 ] Use a safe strscpy call to copy the ethtool stat strings into the relevant buffers, instead of a memcpy that will be accessing out-of-bound data. Fixes: 118d6298f6f0 ("net: mvpp2: add ethtool GOP statistics")

[PATCH 4.19 29/51] i2c: xiic: Add max_read_len quirk

2019-06-09 Thread Greg Kroah-Hartman
From: Robert Hancock commit 49b809586730a77b57ce620b2f9689de765d790b upstream. This driver does not support reading more than 255 bytes at once because the register for storing the number of bytes to read is only 8 bits. Add a max_read_len quirk to enforce this. This was found when using this

[PATCH 4.19 06/51] net: ethernet: ti: cpsw_ethtool: fix ethtool ring param set

2019-06-09 Thread Greg Kroah-Hartman
From: Ivan Khoronzhuk [ Upstream commit 09faf5a7d7c0bcb07faba072f611937af9dd5788 ] Fix ability to set RX descriptor number, the reason - initially "tx_max_pending" was set incorrectly, but the issue appears after adding sanity check, so fix is for "sanity" patch. Fixes: 37e2d99b59c476

[PATCH 4.19 14/51] Revert "fib_rules: return 0 directly if an exactly same rule exists when NLM_F_EXCL not supplied"

2019-06-09 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 4970b42d5c362bf873982db7d93245c5281e58f4 ] This reverts commit e9919a24d3022f72bcadc407e73a6ef17093a849. Nathan reported the new behaviour breaks Android, as Android just add new rules and delete old ones. If we return 0 without adding dup rules, Android

[PATCH 4.19 19/51] parisc: Use implicit space register selection for loading the coherence index of I/O pdirs

2019-06-09 Thread Greg Kroah-Hartman
From: John David Anglin commit 63923d2c3800919774f5c651d503d1dd2adaddd5 upstream. We only support I/O to kernel space. Using %sr1 to load the coherence index may be racy unless interrupts are disabled. This patch changes the code used to load the coherence index to use implicit space register

[PATCH 4.19 16/51] ipv6: fix EFAULT on sendto with icmpv6 and hdrincl

2019-06-09 Thread Greg Kroah-Hartman
From: Olivier Matz [ Upstream commit b9aa52c4cb457e7416cc0c95f475e72ef4a61336 ] The following code returns EFAULT (Bad address): s = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); setsockopt(s, SOL_IPV6, IPV6_HDRINCL, 1); sendto(ipv6_icmp6_packet, addr); /* returns -1, errno = EFAULT */

[PATCH 4.19 18/51] rcu: locking and unlocking need to always be at least barriers

2019-06-09 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 66be4e66a7f422128748e3c3ef6ee72b20a6197b upstream. Herbert Xu pointed out that commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") was incorrect in making the preempt_disable/enable() be conditional on CONFIG_PREEMPT_COUNT. If

[PATCH 4.19 21/51] NFSv4.1: Fix bug only first CB_NOTIFY_LOCK is handled

2019-06-09 Thread Greg Kroah-Hartman
From: Yihao Wu commit ba851a39c9703f09684a541885ed176f8fb7c868 upstream. When a waiter is waked by CB_NOTIFY_LOCK, it will retry nfs4_proc_setlk(). The waiter may fail to nfs4_proc_setlk() and sleep again. However, the waiter is already removed from clp->cl_lock_waitq when handling

[PATCH 4.19 15/51] ipv6: use READ_ONCE() for inet->hdrincl as in ipv4

2019-06-09 Thread Greg Kroah-Hartman
From: Olivier Matz [ Upstream commit 59e3e4b52663a9d97efbce7307f62e4bc5c9ce91 ] As it was done in commit 8f659a03a0ba ("net: ipv4: fix for a race condition in raw_sendmsg") and commit 20b50d79974e ("net: ipv4: emulate READ_ONCE() on ->hdrincl bit-field in raw_sendmsg()") for ipv4, copy the

[PATCH 4.19 24/51] pstore: Convert buf_lock to semaphore

2019-06-09 Thread Greg Kroah-Hartman
From: Kees Cook commit ea84b580b95521644429cc6748b6c2bf27c8b0f3 upstream. Instead of running with interrupts disabled, use a semaphore. This should make it easier for backends that may need to sleep (e.g. EFI) when performing a write: |BUG: sleeping function called from invalid context at

[PATCH 4.19 01/51] ethtool: fix potential userspace buffer overflow

2019-06-09 Thread Greg Kroah-Hartman
From: Vivien Didelot [ Upstream commit 0ee4e76937d69128a6a66861ba393ebdc2ffc8a2 ] ethtool_get_regs() allocates a buffer of size ops->get_regs_len(), and pass it to the kernel driver via ops->get_regs() for filling. There is no restriction about what the kernel drivers can or cannot do with the

[PATCH 4.19 00/51] 4.19.50-stable review

2019-06-09 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.50 release. There are 51 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 Tue 11 Jun 2019 04:40:08 PM UTC. Anything

<    1   2   3   4   5   6   7   8   >