[PATCH 4.9 05/54] Input: i8042 - add nopnp quirk for Acer Aspire 5 A515

2020-10-12 Thread Greg Kroah-Hartman
From: Jiri Kosina commit 5fc27b098dafb8e30794a9db0705074c7d766179 upstream. Touchpad on this laptop is not detected properly during boot, as PNP enumerates (wrongly) AUX port as disabled on this machine. Fix that by adding this board (with admittedly quite funny DMI identifiers) to nopnp quirk

[PATCH 4.9 38/54] team: set dev->needed_headroom in team_setup_by_port()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit 89d01748b2354e210b5d4ea47bc25a42a1b42c82 upstream. Some devices set needed_headroom. If we ignore it, we might end up crashing in various skb_push() for example in ipgre_header() since some layers assume enough headroom has been reserved. Fixes: 1d76efe1577b ("team: ad

[PATCH 4.9 36/54] mm/khugepaged: fix filemap page_to_pgoff(page) != offset

2020-10-12 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 033b5d77551167f8c24ca862ce83d3e0745f9245 upstream. There have been elusive reports of filemap_fault() hitting its VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built with CONFIG_READ_ONLY_THP_FOR_FS=y. Suren has hit it on a kernel with CONFIG_READ_ONLY

[PATCH 4.9 17/54] net/packet: fix overflow in tpacket_rcv

2020-10-12 Thread Greg Kroah-Hartman
From: Or Cohen commit acf69c946233259ab4d64f8869d4037a198c7f06 upstream. Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is

[PATCH 4.9 37/54] sctp: fix sctp_auth_init_hmacs() error path

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit d42ee76ecb6c49d499fc5eb32ca34468d95dbc3e upstream. After freeing ep->auth_hmacs we have to clear the pointer or risk use-after-free as reported by syzbot: BUG: KASAN: use-after-free in sctp_auth_destroy_hmacs net/sctp/auth.c:509 [inline] BUG: KASAN: use-after-free in

[PATCH 4.9 35/54] macsec: avoid use-after-free in macsec_handle_frame()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit c7cc9200e9b4a2ac172e990ef1975cd42975dad6 upstream. De-referencing skb after call to gro_cells_receive() is not allowed. We need to fetch skb->len earlier. Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices") Signed-off-by: Eric Dumazet Cc: Paolo Abeni

[PATCH 4.9 33/54] mtd: rawnand: sunxi: Fix the probe error path

2020-10-12 Thread Greg Kroah-Hartman
From: Miquel Raynal commit 3d84515ffd8fb657e10fa5b1215e9f095fa7efca upstream. nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead. Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Signed-off

[PATCH 4.9 54/54] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails

2020-10-12 Thread Greg Kroah-Hartman
From: Anant Thazhemadam commit f45a4248ea4cc13ed50618ff066849f9587226b2 upstream. When get_registers() fails in set_ethernet_addr(),the uninitialized value of node_id gets copied over as the address. So, check the return value of get_registers(). If get_registers() executed successfully (i.e.,

[PATCH 4.9 48/54] rxrpc: Fix rxkad token xdr encoding

2020-10-12 Thread Greg Kroah-Hartman
From: Marc Dionne [ Upstream commit 56305118e05b2db8d0395bba640ac9a3aee92624 ] The session key should be encoded with just the 8 data bytes and no length; ENCODE_DATA precedes it with a 4 byte length, which confuses some existing tools that try to parse this format. Add an ENCODE_BYTES macro th

[PATCH 4.14 01/70] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock

2020-10-12 Thread Greg Kroah-Hartman
From: Stefano Garzarella [ Upstream commit 9c7a5582f5d720dc35cfcc42ccaded69f0642e4a ] Some callbacks used by the upper layers can run while we are in the .remove(). A potential use-after-free can happen, because we free the_virtio_vsock without knowing if the callbacks are over or not. To solve

Re: [2/2] drm/msm: Add support for GPU cooling

2020-10-12 Thread Akhil P Oommen
On 10/10/2020 12:06 AM, m...@chromium.org wrote: Hi Akhil, On Thu, Oct 08, 2020 at 10:39:07PM +0530, Akhil P Oommen wrote: Register GPU as a devfreq cooling device so that it can be passively cooled by the thermal framework. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/msm_gpu.c |

[PATCH 4.14 03/70] vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock()

2020-10-12 Thread Greg Kroah-Hartman
From: Stefano Garzarella [ Upstream commit 4c7246dc45e2706770d5233f7ce1597a07e069ba ] We are going to add 'struct vsock_sock *' parameter to virtio_transport_get_ops(). In some cases, like in the virtio_transport_reset_no_sock(), we don't have any socket assigned to the packet received, so we c

[PATCH 4.14 02/70] vsock/virtio: stop workers during the .remove()

2020-10-12 Thread Greg Kroah-Hartman
From: Stefano Garzarella [ Upstream commit 17dd1367389cfe7f150790c83247b68e0c19d106 ] Before to call vdev->config->reset(vdev) we need to be sure that no one is accessing the device, for this reason, we add new variables in the struct virtio_vsock to stop the workers during the .remove(). This

[PATCH 4.9 31/54] driver core: Fix probe_count imbalance in really_probe()

2020-10-12 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit b292b50b0efcc7095d8bf15505fba6909bb35dce upstream. syzbot is reporting hung task in wait_for_device_probe() [1]. At least, we always need to decrement probe_count if we incremented probe_count in really_probe(). However, since I can't find "Resources present before pro

[PATCH 4.9 15/54] i2c: cpm: Fix i2c_ram structure

2020-10-12 Thread Greg Kroah-Hartman
From: Nicolas VINCENT [ Upstream commit a2bd970aa62f2f7f80fd0d212b1d4ccea5df4aed ] the i2c_ram structure is missing the sdmatmp field mentionned in datasheet for MPC8272 at paragraph 36.5. With this field missing, the hardware would write past the allocated memory done through cpm_muram_alloc fo

[PATCH 4.9 43/54] xfrm: clone whole liftime_cur structure in xfrm_do_migrate

2020-10-12 Thread Greg Kroah-Hartman
From: Antony Antony [ Upstream commit 8366685b2883e523f91e9816d7be371eb1144749 ] When we clone state only add_time was cloned. It missed values like bytes, packets. Now clone the all members of the structure. v1->v3: - use memcpy to copy the entire structure Fixes: 80c9abaabf42 ("[XFRM]: Ext

[PATCH 4.14 11/70] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-12 Thread Greg Kroah-Hartman
From: Lucy Yan [ Upstream commit ee460417d254d941dfea5fb7cff841f589643992 ] Increase Rx ring size to address issue where hardware is reaching the receive work limit. Before: [ 102.223342] de2104x :17:00.0 eth0: rx work limit reached [ 102.245695] de2104x :17:00.0 eth0: rx work limit

[PATCH 4.9 42/54] xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate

2020-10-12 Thread Greg Kroah-Hartman
From: Antony Antony [ Upstream commit 91a46c6d1b4fcbfa4773df9421b8ad3e58088101 ] XFRMA_REPLAY_ESN_VAL was not cloned completely from the old to the new. Migrate this attribute during XFRMA_MSG_MIGRATE v1->v2: - move curleft cloning to a separate patch Fixes: af2f464e326e ("xfrm: Assign esn po

[PATCH 4.14 13/70] drivers/net/wan/lapbether: Make skb->protocol consistent with the header

2020-10-12 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 83f9a9c8c1edc222846dc1bde6e3479703e8e5a3 ] This driver is a virtual driver stacked on top of Ethernet interfaces. When this driver transmits data on the Ethernet device, the skb->protocol setting is inconsistent with the Ethernet header prepended to the skb. This

[PATCH 4.14 10/70] drm/sun4i: mixer: Extend regmap max_register

2020-10-12 Thread Greg Kroah-Hartman
From: Martin Cerveny [ Upstream commit 74ea06164cda81dc80e97790164ca533fd7e3087 ] Better guess. Secondary CSC registers are from 0xF. Signed-off-by: Martin Cerveny Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200906162140

[PATCH 4.14 04/70] net: virtio_vsock: Enhance connection semantics

2020-10-12 Thread Greg Kroah-Hartman
From: Sebastien Boeuf [ Upstream commit df12eb6d6cd920ab2f0e0a43cd6e1c23a05cea91 ] Whenever the vsock backend on the host sends a packet through the RX queue, it expects an answer on the TX queue. Unfortunately, there is one case where the host side will hang waiting for the answer and might eff

[PATCH 4.14 27/70] epoll: replace ->visited/visited_list with generation count

2020-10-12 Thread Greg Kroah-Hartman
From: Al Viro commit 18306c404abe18a0972587a6266830583c60c928 upstream. removes the need to clear it, along with the races. Signed-off-by: Al Viro Signed-off-by: Greg Kroah-Hartman --- fs/eventpoll.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions(-) --- a/

[PATCH 4.14 35/70] fbcon: Fix global-out-of-bounds read in fbcon_get_font()

2020-10-12 Thread Greg Kroah-Hartman
From: Peilin Ye commit 5af08640795b2b9a940c9266c0260455377ae262 upstream. fbcon_get_font() is reading out-of-bounds. A malicious user may resize `vc->vc_font.height` to a large value, causing fbcon_get_font() to read out of `fontdata`. fbcon_get_font() handles both built-in and user-provided fo

[PATCH 4.9 53/54] mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged

2020-10-12 Thread Greg Kroah-Hartman
From: Vijay Balakrishna commit 4aab2be0983031a05cb4a19696c9da5749523426 upstream. When memory is hotplug added or removed the min_free_kbytes should be recalculated based on what is expected by khugepaged. Currently after hotplug, min_free_kbytes will be set to a lower default and higher defaul

[GIT PULL] scheduler changes for v5.10

2020-10-12 Thread Ingo Molnar
Linus, Please pull the latest sched/core git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-core-2020-10-12 # HEAD: feff2e65efd8d84cf831668e182b2ce73c604bbb sched/deadline: Unthrottle PI boosted threads while enqueuing Scheduler changes for v5.10: - Reorgan

[PATCH 4.14 17/70] nvme-fc: fail new connections to a deleted host or remote port

2020-10-12 Thread Greg Kroah-Hartman
From: James Smart [ Upstream commit 9e0e8dac985d4bd07d9e62922b9d189d3ca2fccf ] The lldd may have made calls to delete a remote port or local port and the delete is in progress when the cli then attempts to create a new controller. Currently, this proceeds without error although it can't be very

[PATCH 4.14 09/70] drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices

2020-10-12 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 44a049c42681de71c783d75cd6e56b4e339488b0 ] PVC devices are virtual devices in this driver stacked on top of the actual HDLC device. They are the devices normal users would use. PVC devices have two types: normal PVC devices and Ethernet-emulating PVC devices. When

[PATCH 4.14 39/70] platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse

2020-10-12 Thread Greg Kroah-Hartman
From: Aaron Ma commit 720ef73d1a239e33c3ad8fac356b9b1348e68aaf upstream. Evaluating ACPI _BCL could fail, then ACPI buffer size will be set to 0. When reuse this ACPI buffer, AE_BUFFER_OVERFLOW will be triggered. Re-initialize buffer size will make ACPI evaluate successfully. Fixes: 46445b6b89

[PATCH 4.14 12/70] rndis_host: increase sleep time in the query-response loop

2020-10-12 Thread Greg Kroah-Hartman
From: Olympia Giannou [ Upstream commit 4202c9fdf03d79dedaa94b2c4cf574f25793d669 ] Some WinCE devices face connectivity issues via the NDIS interface. They fail to register, resulting in -110 timeout errors and failures during the probe procedure. In this kind of WinCE devices, the Windows-side

[PATCH 4.14 28/70] epoll: EPOLL_CTL_ADD: close the race in decision to take fast path

2020-10-12 Thread Greg Kroah-Hartman
From: Al Viro commit fe0a916c1eae8e17e86c3753d13919177d63ed7e upstream. Checking for the lack of epitems refering to the epoll we want to insert into is not enough; we might have an insertion of that epoll into another one that has already collected the set of files to recheck for excessive reve

[PATCH 4.14 14/70] drivers/net/wan/hdlc: Set skb->protocol before transmitting

2020-10-12 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 9fb030a70431a2a2a1b292dbf0b2f399cc072c16 ] This patch sets skb->protocol before transmitting frames on the HDLC device, so that a user listening on the HDLC device with an AF_PACKET socket will see outgoing frames' sll_protocol field correctly set and consistent wi

[PATCH 4.14 23/70] Input: trackpoint - enable Synaptics trackpoints

2020-10-12 Thread Greg Kroah-Hartman
From: Vincent Huang [ Upstream commit 996d585b079ad494a30cac10e08585bcd5345125 ] Add Synaptics IDs in trackpoint_start_protocol() to mark them as valid. Signed-off-by: Vincent Huang Fixes: 6c77545af100 ("Input: trackpoint - add new trackpoint variant IDs") Reviewed-by: Harry Cutts Tested-by:

[PATCH 4.14 15/70] mac80211: do not allow bigger VHT MPDUs than the hardware supports

2020-10-12 Thread Greg Kroah-Hartman
From: Felix Fietkau [ Upstream commit 3bd5c7a28a7c3aba07a2d300d43f8e988809e147 ] Limit maximum VHT MPDU size by local capability. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200917125031.45009-1-...@nbd.name Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/

[PATCH 4.14 21/70] iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate()

2020-10-12 Thread Greg Kroah-Hartman
From: Yu Kuai [ Upstream commit 1a26044954a6d1f4d375d5e62392446af663be7a ] if of_find_device_by_node() succeed, exynos_iommu_of_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: aa759fd376fb ("iommu/ex

[PATCH 4.14 44/70] ftrace: Move RCU is watching check after recursion check

2020-10-12 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit b40341fad6cc2daa195f8090fd3348f18fff640a upstream. The first thing that the ftrace function callback helper functions should do is to check for recursion. Peter Zijlstra found that when "rcu_is_watching()" had its notrace removed, it caused perf function trac

[PATCH 4.14 46/70] mm/khugepaged: fix filemap page_to_pgoff(page) != offset

2020-10-12 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 033b5d77551167f8c24ca862ce83d3e0745f9245 upstream. There have been elusive reports of filemap_fault() hitting its VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built with CONFIG_READ_ONLY_THP_FOR_FS=y. Suren has hit it on a kernel with CONFIG_READ_ONLY

[PATCH 4.14 20/70] clk: samsung: exynos4: mark chipid clock as CLK_IGNORE_UNUSED

2020-10-12 Thread Greg Kroah-Hartman
From: Marek Szyprowski [ Upstream commit f3bb0f796f5ffe32f0fbdce5b1b12eb85511158f ] The ChipID IO region has it's own clock, which is being disabled while scanning for unused clocks. It turned out that some CPU hotplug, CPU idle or even SOC firmware code depends on the reads from that area. Fix

Re: [PATCH 11/13] timekeeping: remove xtime_update

2020-10-12 Thread Arnd Bergmann
On Mon, Oct 12, 2020 at 3:16 PM Geert Uytterhoeven wrote: > On Thu, Oct 8, 2020 at 5:48 PM Arnd Bergmann wrote: > > There are no more users of xtime_update aside from legacy_timer_tick(), > > so fold it into that function and remove the declaration. > > > > update_process_times() is now only call

[PATCH 4.14 36/70] net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()

2020-10-12 Thread Greg Kroah-Hartman
From: Anant Thazhemadam commit 3dc289f8f139997f4e9d3cfccf8738f20d23e47b upstream. In nl80211_parse_key(), key.idx is first initialized as -1. If this value of key.idx remains unmodified and gets returned, and nl80211_key_allowed() also returns 0, then rdev_del_key() gets called with key.idx = -1

[PATCH 4.14 22/70] i2c: cpm: Fix i2c_ram structure

2020-10-12 Thread Greg Kroah-Hartman
From: Nicolas VINCENT [ Upstream commit a2bd970aa62f2f7f80fd0d212b1d4ccea5df4aed ] the i2c_ram structure is missing the sdmatmp field mentionned in datasheet for MPC8272 at paragraph 36.5. With this field missing, the hardware would write past the allocated memory done through cpm_muram_alloc fo

[PATCH 4.14 24/70] random32: Restore __latent_entropy attribute on net_rand_state

2020-10-12 Thread Greg Kroah-Hartman
From: Thibaut Sautereau [ Upstream commit 09a6b0bc3be793ca8cba580b7992d73e9f68f15d ] Commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity") broke compilation and was temporarily fixed by Linus in 83bdc7275e62 ("random32: remove net_rand_state from the latent entr

[PATCH 4.14 37/70] usermodehelper: reset umask to default before executing user process

2020-10-12 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 4013c1496c49615d90d36b9d513eee8e369778e9 upstream. Kernel threads intentionally do CLONE_FS in order to follow any changes that 'init' does to set up the root directory (or cwd). It is admittedly a bit odd, but it avoids the situation where 'init' does some extensive

[PATCH 4.19 12/49] driver core: Fix probe_count imbalance in really_probe()

2020-10-12 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit b292b50b0efcc7095d8bf15505fba6909bb35dce upstream. syzbot is reporting hung task in wait_for_device_probe() [1]. At least, we always need to decrement probe_count if we incremented probe_count in really_probe(). However, since I can't find "Resources present before pro

[PATCH 4.19 14/49] i2c: i801: Exclude device from suspend direct complete optimization

2020-10-12 Thread Greg Kroah-Hartman
From: Jean Delvare commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream. By default, PCI drivers with runtime PM enabled will skip the calls to suspend and resume on system PM. For this driver, we don't want that, as we need to perform additional steps for system PM to work properly on all s

[PATCH 4.19 15/49] mtd: rawnand: sunxi: Fix the probe error path

2020-10-12 Thread Greg Kroah-Hartman
From: Miquel Raynal commit 3d84515ffd8fb657e10fa5b1215e9f095fa7efca upstream. nand_release() is supposed be called after MTD device registration. Here, only nand_scan() happened, so use nand_cleanup() instead. Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support") Signed-off

[PATCH 4.19 20/49] xfrmi: drop ignore_df check before updating pmtu

2020-10-12 Thread Greg Kroah-Hartman
From: Sabrina Dubroca commit 45a36a18d01907710bad5258d81f76c18882ad88 upstream. xfrm interfaces currently test for !skb->ignore_df when deciding whether to update the pmtu on the skb's dst. Because of this, no pmtu exception is created when we do something like: ping -s 1438 By dropping t

[PATCH 4.14 43/70] Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space

2020-10-12 Thread Greg Kroah-Hartman
From: Robbie Ko commit 8ecebf4d767e2307a946c8905278d6358eda35c3 upstream. Commit e9894fd3e3b3 ("Btrfs: fix snapshot vs nocow writting") forced nocow writes to fallback to COW, during writeback, when a snapshot is created. This resulted in writes made before creating the snapshot to unexpectedly

[PATCH 4.19 19/49] mm/khugepaged: fix filemap page_to_pgoff(page) != offset

2020-10-12 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 033b5d77551167f8c24ca862ce83d3e0745f9245 upstream. There have been elusive reports of filemap_fault() hitting its VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built with CONFIG_READ_ONLY_THP_FOR_FS=y. Suren has hit it on a kernel with CONFIG_READ_ONLY

[PATCH 4.19 02/49] Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts

2020-10-12 Thread Greg Kroah-Hartman
From: Peilin Ye commit 6735b4632def0640dbdf4eb9f99816aca18c4f16 upstream. syzbot has reported an issue in the framebuffer layer, where a malicious user may overflow our built-in font data buffers. In order to perform a reliable range check, subsystems need to know `FONTDATAMAX` for each built-i

[PATCH 4.14 45/70] macsec: avoid use-after-free in macsec_handle_frame()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit c7cc9200e9b4a2ac172e990ef1975cd42975dad6 upstream. De-referencing skb after call to gro_cells_receive() is not allowed. We need to fetch skb->len earlier. Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices") Signed-off-by: Eric Dumazet Cc: Paolo Abeni

[PATCH 4.14 18/70] pinctrl: mvebu: Fix i2c sda definition for 98DX3236

2020-10-12 Thread Greg Kroah-Hartman
From: Chris Packham [ Upstream commit 63c3212e7a37d68c89a13bdaebce869f4e064e67 ] Per the datasheet the i2c functions use MPP_Sel=0x1. They are documented as using MPP_Sel=0x4 as well but mixing 0x1 and 0x4 is clearly wrong. On the board tested 0x4 resulted in a non-functioning i2c bus so stick w

[PATCH 4.14 40/70] driver core: Fix probe_count imbalance in really_probe()

2020-10-12 Thread Greg Kroah-Hartman
From: Tetsuo Handa commit b292b50b0efcc7095d8bf15505fba6909bb35dce upstream. syzbot is reporting hung task in wait_for_device_probe() [1]. At least, we always need to decrement probe_count if we incremented probe_count in really_probe(). However, since I can't find "Resources present before pro

[PATCH 4.19 13/49] perf top: Fix stdio interface input handling with glibc 2.28+

2020-10-12 Thread Greg Kroah-Hartman
From: Tommi Rantala commit 29b4f5f188571c112713c35cc87eefb46efee612 upstream. Since glibc 2.28 when running 'perf top --stdio', input handling no longer works, but hitting any key always just prints the "Mapped keys" help text. To fix it, call clearerr() in the display_thread() loop to clear an

[PATCH 4.19 17/49] nvme-core: put ctrl ref when module ref get fail

2020-10-12 Thread Greg Kroah-Hartman
From: Chaitanya Kulkarni commit 4bab69093044ca81f394bd0780be1b71c5a4d308 upstream. When try_module_get() fails in the nvme_dev_open() it returns without releasing the ctrl reference which was taken earlier. Put the ctrl reference which is taken before calling the try_module_get() in the error r

[PATCH 4.19 10/49] platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting

2020-10-12 Thread Greg Kroah-Hartman
From: Hans de Goede commit 8169bd3e6e193497cab781acddcff8fde5d0c416 upstream. 2 recent commits: cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") 1fac39fd0316 ("platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Po

[PATCH 4.19 18/49] macsec: avoid use-after-free in macsec_handle_frame()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit c7cc9200e9b4a2ac172e990ef1975cd42975dad6 upstream. De-referencing skb after call to gro_cells_receive() is not allowed. We need to fetch skb->len earlier. Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices") Signed-off-by: Eric Dumazet Cc: Paolo Abeni

[PATCH 4.19 21/49] cifs: Fix incomplete memory allocation on setxattr path

2020-10-12 Thread Greg Kroah-Hartman
From: Vladimir Zapolskiy commit 64b7f674c292207624b3d788eda2dde3dc1415df upstream. On setxattr() syscall path due to an apprent typo the size of a dynamically allocated memory chunk for storing struct smb2_file_full_ea_info object is computed incorrectly, to be more precise the first addend is t

[PATCH 4.19 05/49] net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key()

2020-10-12 Thread Greg Kroah-Hartman
From: Anant Thazhemadam commit 3dc289f8f139997f4e9d3cfccf8738f20d23e47b upstream. In nl80211_parse_key(), key.idx is first initialized as -1. If this value of key.idx remains unmodified and gets returned, and nl80211_key_allowed() also returns 0, then rdev_del_key() gets called with key.idx = -1

[PATCH 4.19 08/49] platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360

2020-10-12 Thread Greg Kroah-Hartman
From: Hans de Goede commit d823346876a970522ff9e4d2b323c9b734dcc4de upstream. Commit cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") restored SW_TABLET_MODE reporting on the HP stream x360 11 series on which it was previously broken by com

[PATCH 4.19 16/49] arm64: dts: stratix10: add status to qspi dts node

2020-10-12 Thread Greg Kroah-Hartman
From: Dinh Nguyen commit 263a0269a59c0b4145829462a107fe7f7327105f upstream. Add status = "okay" to QSPI node. Fixes: 0cb140d07fc75 ("arm64: dts: stratix10: Add QSPI support for Stratix10") Cc: linux-stable # >= v5.6 Signed-off-by: Dinh Nguyen [iwamatsu: Drop arch/arm64/boot/dts/altera/socfpga

[PATCH 4.19 04/49] Revert "ravb: Fixed to be able to unload modules"

2020-10-12 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven commit 77972b55fb9d35d4a6b0abca99abffaa4ec6a85b upstream. This reverts commit 1838d6c62f57836639bd3d83e7855e0ee4f6defc. This commit moved the ravb_mdio_init() call (and thus the of_mdiobus_register() call) from the ravb_probe() to the ravb_open() call. This causes a re

[PATCH 4.19 06/49] drm/nouveau/mem: guard against NULL pointer access in mem_del

2020-10-12 Thread Greg Kroah-Hartman
From: Karol Herbst commit d10285a25e29f13353bbf7760be8980048c1ef2f upstream. other drivers seems to do something similar Signed-off-by: Karol Herbst Cc: dri-devel Cc: Dave Airlie Cc: sta...@vger.kernel.org Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201

[PATCH 4.19 27/49] net: team: fix memory leak in __team_options_register

2020-10-12 Thread Greg Kroah-Hartman
From: Anant Thazhemadam commit 9a9e77495958c7382b2438bc19746dd3bb8e upstream. The variable "i" isn't initialized back correctly after the first loop under the label inst_rollback gets executed. The value of "i" is assigned to be option_count - 1, and the ensuing loop (under alloc_rollback)

[PATCH 4.19 25/49] sctp: fix sctp_auth_init_hmacs() error path

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit d42ee76ecb6c49d499fc5eb32ca34468d95dbc3e upstream. After freeing ep->auth_hmacs we have to clear the pointer or risk use-after-free as reported by syzbot: BUG: KASAN: use-after-free in sctp_auth_destroy_hmacs net/sctp/auth.c:509 [inline] BUG: KASAN: use-after-free in

[PATCH 4.19 26/49] team: set dev->needed_headroom in team_setup_by_port()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit 89d01748b2354e210b5d4ea47bc25a42a1b42c82 upstream. Some devices set needed_headroom. If we ignore it, we might end up crashing in various skb_push() for example in ipgre_header() since some layers assume enough headroom has been reserved. Fixes: 1d76efe1577b ("team: ad

[PATCH 4.19 28/49] openvswitch: handle DNAT tuple collision

2020-10-12 Thread Greg Kroah-Hartman
From: Dumitru Ceara commit 8aa7b526dc0b5dbf40c1b834d76a667ad672a410 upstream. With multiple DNAT rules it's possible that after destination translation the resulting tuples collide. For example, two openvswitch flows: nw_dst=10.0.0.10,tp_dst=10, actions=ct(commit,table=2,nat(dst=20.0.0.1:20)) n

[PATCH 4.19 29/49] drm/amdgpu: prevent double kfree ttm->sg

2020-10-12 Thread Greg Kroah-Hartman
From: Philip Yang [ Upstream commit 1d0e16ac1a9e800598dcfa5b6bc53b704a103390 ] Set ttm->sg to NULL after kfree, to avoid memory corruption backtrace: [ 420.932812] kernel BUG at /build/linux-do9eLF/linux-4.15.0/mm/slub.c:295! [ 420.934182] invalid opcode: [#1] SMP NOPTI [ 420.935445] Mo

[PATCH 4.19 09/49] platform/x86: thinkpad_acpi: initialize tp_nvram_state variable

2020-10-12 Thread Greg Kroah-Hartman
From: Tom Rix commit 5f38b06db8af3ed6c2fc1b427504ca56fae2eacc upstream. clang static analysis flags this represenative problem thinkpad_acpi.c:2523:7: warning: Branch condition evaluates to a garbage value if (!oldn->mute || ^~~ In hotkey_kthread()

[PATCH 4.19 03/49] fbcon: Fix global-out-of-bounds read in fbcon_get_font()

2020-10-12 Thread Greg Kroah-Hartman
From: Peilin Ye commit 5af08640795b2b9a940c9266c0260455377ae262 upstream. fbcon_get_font() is reading out-of-bounds. A malicious user may resize `vc->vc_font.height` to a large value, causing fbcon_get_font() to read out of `fontdata`. fbcon_get_font() handles both built-in and user-provided fo

[PATCH 4.19 07/49] usermodehelper: reset umask to default before executing user process

2020-10-12 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 4013c1496c49615d90d36b9d513eee8e369778e9 upstream. Kernel threads intentionally do CLONE_FS in order to follow any changes that 'init' does to set up the root directory (or cwd). It is admittedly a bit odd, but it avoids the situation where 'init' does some extensive

[PATCH 5.4 24/85] i2c: i801: Exclude device from suspend direct complete optimization

2020-10-12 Thread Greg Kroah-Hartman
From: Jean Delvare commit 845b89127bc5458d0152a4d63f165c62a22fcb70 upstream. By default, PCI drivers with runtime PM enabled will skip the calls to suspend and resume on system PM. For this driver, we don't want that, as we need to perform additional steps for system PM to work properly on all s

[PATCH 5.4 06/85] io_uring: Fix missing smp_mb() in io_cancel_async_work()

2020-10-12 Thread Greg Kroah-Hartman
From: Muchun Song The store to req->flags and load req->work_task should not be reordering in io_cancel_async_work(). We should make sure that either we store REQ_F_CANCE flag to req->flags or we see the req->work_task setted in io_sq_wq_submit_work(). Fixes: 1c4404efcf2c ("io_uring: make sure a

Re: [PATCH RFC 0/2] use interpreters to invoke scripts

2020-10-12 Thread Lukas Bulwahn
On Sat, 3 Oct 2020, Ujjwal Kumar wrote: > This patch series aims at removing the dependency on execute > bit of the scripts in the kbuild system. > > If not working with fresh clone of linux-next, clean the srctree: > make distclean > make tools/clean > > To test the dependency on execute bi

[PATCH 4.19 45/49] rxrpc: Fix server keyring leak

2020-10-12 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit 38b1dc47a35ba14c3f4472138ea56d014c2d609b ] If someone calls setsockopt() twice to set a server key keyring, the first keyring is leaked. Fix it to return an error instead if the server key keyring is already set. Fixes: 17926a79320a ("[AF_RXRPC]: Provide s

[PATCH 4.19 24/49] i2c: owl: Clear NACK and BUS error bits

2020-10-12 Thread Greg Kroah-Hartman
From: Cristian Ciocaltea commit f5b3f433641c543ebe5171285a42aa6adcdb2d22 upstream. When the NACK and BUS error bits are set by the hardware, the driver is responsible for clearing them by writing "1" into the corresponding status registers. Hence perform the necessary operations in owl_i2c_inte

[PATCH 4.19 23/49] i2c: meson: fixup rate calculation with filter delay

2020-10-12 Thread Greg Kroah-Hartman
From: Nicolas Belin commit 1334d3b4e49e35d8912a7c37ffca4c5afb9a0516 upstream. Apparently, 15 cycles of the peripheral clock are used by the controller for sampling and filtering. Because this was not known before, the rate calculation is slightly off. Clean up and fix the calculation taking thi

[PATCH 5.4 23/85] perf top: Fix stdio interface input handling with glibc 2.28+

2020-10-12 Thread Greg Kroah-Hartman
From: Tommi Rantala commit 29b4f5f188571c112713c35cc87eefb46efee612 upstream. Since glibc 2.28 when running 'perf top --stdio', input handling no longer works, but hitting any key always just prints the "Mapped keys" help text. To fix it, call clearerr() in the display_thread() loop to clear an

[PATCH 5.4 05/85] io_uring: Fix resource leaking when kill the process

2020-10-12 Thread Greg Kroah-Hartman
From: Yinyin Zhu The commit 1c4404efcf2c0> ("") doesn't solve the resource leak problem totally! When kworker is doing a io task for the io_uring, The process which submitted the io task has received a SIGKILL signal from the user. Then the io_cancel_async_work function could have sent a SIGI

[PATCH 5.4 00/85] 5.4.71-rc1 review

2020-10-12 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.4.71 release. There are 85 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 Wed, 14 Oct 2020 13:26:14 +. Anything rece

[PATCH 5.4 08/85] io_uring: Fix double list add in io_queue_async_work()

2020-10-12 Thread Greg Kroah-Hartman
From: Muchun Song If we queue work in io_poll_wake(), it will leads to list double add. So we should add the list when the callback func is the io_sq_wq_submit_work. The following oops was seen: list_add double add: new=9ca6a8f1b0e0, prev=9ca62001cee8, next=9ca6a8f1b0e0.

[PATCH 5.4 01/85] fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h

2020-10-12 Thread Greg Kroah-Hartman
From: Peilin Ye commit bb0890b4cd7f8203e3aa99c6d0f062d6acdaad27 upstream. drivers/video/console/newport_con.c is borrowing FONT_EXTRA_WORDS macros from drivers/video/fbdev/core/fbcon.h. To keep things simple, move all definitions into . Since newport_con now uses four extra words, initialize th

[PATCH 5.4 25/85] arm64: dts: stratix10: add status to qspi dts node

2020-10-12 Thread Greg Kroah-Hartman
From: Dinh Nguyen commit 263a0269a59c0b4145829462a107fe7f7327105f upstream. Add status = "okay" to QSPI node. Fixes: 0cb140d07fc75 ("arm64: dts: stratix10: Add QSPI support for Stratix10") Cc: linux-stable # >= v5.6 Signed-off-by: Dinh Nguyen [iwamatsu: Drop arch/arm64/boot/dts/altera/socfpga

[PATCH 5.4 19/85] platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting

2020-10-12 Thread Greg Kroah-Hartman
From: Hans de Goede commit 8169bd3e6e193497cab781acddcff8fde5d0c416 upstream. 2 recent commits: cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") 1fac39fd0316 ("platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Po

[PATCH 5.4 26/85] Btrfs: send, allow clone operations within the same file

2020-10-12 Thread Greg Kroah-Hartman
From: Filipe Manana commit 11f2069c113e02971b8db6fda62f9b9cd31a030f upstream. For send we currently skip clone operations when the source and destination files are the same. This is so because clone didn't support this case in its early days, but support for it was added back in May 2013 by comm

[PATCH 5.4 27/85] Btrfs: send, fix emission of invalid clone operations within the same file

2020-10-12 Thread Greg Kroah-Hartman
From: Filipe Manana commit 9722b10148504c4153a74a9c89725af271e490fc upstream. When doing an incremental send and a file has extents shared with itself at different file offsets, it's possible for send to emit clone operations that will fail at the destination because the source range goes beyond

[PATCH 5.4 11/85] vhost: Dont call access_ok() when using IOTLB

2020-10-12 Thread Greg Kroah-Hartman
From: Greg Kurz commit 0210a8db2aeca393fb3067e234967877e3146266 upstream. When the IOTLB device is enabled, the vring addresses we get from userspace are GIOVAs. It is thus wrong to pass them down to access_ok() which only takes HVAs. Access validation is done at prefetch time with IOTLB. Teach

[PATCH 5.4 15/85] platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360

2020-10-12 Thread Greg Kroah-Hartman
From: Hans de Goede commit d823346876a970522ff9e4d2b323c9b734dcc4de upstream. Commit cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") restored SW_TABLET_MODE reporting on the HP stream x360 11 series on which it was previously broken by com

[PATCH 5.4 13/85] usermodehelper: reset umask to default before executing user process

2020-10-12 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 4013c1496c49615d90d36b9d513eee8e369778e9 upstream. Kernel threads intentionally do CLONE_FS in order to follow any changes that 'init' does to set up the root directory (or cwd). It is admittedly a bit odd, but it avoids the situation where 'init' does some extensive

[PATCH 5.4 36/85] tcp: use sendpage_ok() to detect misused .sendpage

2020-10-12 Thread Greg Kroah-Hartman
From: Coly Li commit cf83a17edeeb36195596d2dae060a7c381db35f1 upstream. commit a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") adds the checks for Slab pages, but the pages don't have page_count are still missing from the check. Network layer's sendpage method is not de

[PATCH 5.4 37/85] nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage()

2020-10-12 Thread Greg Kroah-Hartman
From: Coly Li commit 7d4194abfc4de13a2663c7fee6891de8360f7a52 upstream. Currently nvme_tcp_try_send_data() doesn't use kernel_sendpage() to send slab pages. But for pages allocated by __get_free_pages() without __GFP_COMP, which also have refcount as 0, they are still sent by kernel_sendpage() t

[PATCH 5.4 12/85] vhost: Use vhost_get_used_size() in vhost_vring_set_addr()

2020-10-12 Thread Greg Kroah-Hartman
From: Greg Kurz commit 71878fa46c7e3b40fa7b3f1b6e4ba3f92f1ac359 upstream. The open-coded computation of the used size doesn't take the event into account when the VIRTIO_RING_F_EVENT_IDX feature is present. Fix that by using vhost_get_used_size(). Fixes: 8ea8cf89e19a ("vhost: support event inde

[PATCH 5.4 14/85] Platform: OLPC: Fix memleak in olpc_ec_probe

2020-10-12 Thread Greg Kroah-Hartman
From: Dinghao Liu commit 4fd9ac6bd3044734a7028bd993944c3617d1eede upstream. When devm_regulator_register() fails, ec should be freed just like when olpc_ec_cmd() fails. Fixes: 231c0c216172a ("Platform: OLPC: Add a regulator for the DCON") Signed-off-by: Dinghao Liu Signed-off-by: Andy Shevchen

[PATCH 5.4 28/85] btrfs: volumes: Use more straightforward way to calculate map length

2020-10-12 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 2d974619a77f106f3d1341686dea95c0eaad601f upstream. The old code goes: offset = logical - em->start; length = min_t(u64, em->len - offset, length); Where @length calculation is dependent on offset, it can take reader several more seconds to find it's just

[PATCH 5.4 35/85] net: introduce helper sendpage_ok() in include/linux/net.h

2020-10-12 Thread Greg Kroah-Hartman
From: Coly Li commit c381b07941adc2274ce552daf86c94701c5e265a upstream. The original problem was from nvme-over-tcp code, who mistakenly uses kernel_sendpage() to send pages allocated by __get_free_pages() without __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on tail pages, s

[PATCH 5.4 34/85] mm/khugepaged: fix filemap page_to_pgoff(page) != offset

2020-10-12 Thread Greg Kroah-Hartman
From: Hugh Dickins commit 033b5d77551167f8c24ca862ce83d3e0745f9245 upstream. There have been elusive reports of filemap_fault() hitting its VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built with CONFIG_READ_ONLY_THP_FOR_FS=y. Suren has hit it on a kernel with CONFIG_READ_ONLY

[PATCH 5.4 29/85] btrfs: Ensure we trim ranges across block group boundary

2020-10-12 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 6b7faadd985c990324b5b5bd18cc4ba5c395eb65 upstream. [BUG] When deleting large files (which cross block group boundary) with discard mount option, we find some btrfs_discard_extent() calls only trimmed part of its space, not the whole range: btrfs_discard_extent: type=0x1

[PATCH 5.4 17/85] bpf: Fix sysfs export of empty BTF section

2020-10-12 Thread Greg Kroah-Hartman
From: Tony Ambardar commit e23bb04b0c938588eae41b7f4712b722290ed2b8 upstream. If BTF data is missing or removed from the ELF section it is still exported via sysfs as a zero-length file: root@OpenWrt:/# ls -l /sys/kernel/btf/vmlinux -r--r--r--1 rootroot0 Jul 18 02:59 /sys/kernel

[PATCH 5.4 57/85] iavf: Fix incorrect adapter get in iavf_resume

2020-10-12 Thread Greg Kroah-Hartman
From: Sylwester Dziedziuch [ Upstream commit 75598a8fc0e0dff2aa5d46c62531b36a595f1d4f ] When calling iavf_resume there was a crash because wrong function was used to get iavf_adapter and net_device pointers. Changed how iavf_resume is getting iavf_adapter and net_device pointers from pci_dev. F

[PATCH 5.4 33/85] macsec: avoid use-after-free in macsec_handle_frame()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet commit c7cc9200e9b4a2ac172e990ef1975cd42975dad6 upstream. De-referencing skb after call to gro_cells_receive() is not allowed. We need to fetch skb->len earlier. Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices") Signed-off-by: Eric Dumazet Cc: Paolo Abeni

[PATCH 5.4 59/85] bonding: set dev->needed_headroom in bond_setup_by_slave()

2020-10-12 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit f32f19339596b214c208c0dba716f4b6cc4f6958 ] syzbot managed to crash a host by creating a bond with a GRE device. For non Ethernet device, bonding calls bond_setup_by_slave() instead of ether_setup(), and unfortunately dev->needed_headroom was not copied from

<    1   2   3   4   5   6   7   8   9   10   >