[PATCH 5.8 066/124] 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.

[PATCH 5.8 043/124] 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 5.8 045/124] 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]

[PATCH 5.8 051/124] btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks

2020-10-12 Thread Greg Kroah-Hartman
From: Josef Bacik [ Upstream commit a466c85edc6fbe845facc8f57c408c544f42899e ] When closing and freeing the source device we could end up doing our final blkdev_put() on the bdev, which will grab the bd_mutex. As such we want to be holding as few locks as possible, so move this call outside of

[PATCH 5.8 023/124] r8169: consider that PHY reset may still be in progress after applying firmware

2020-10-12 Thread Greg Kroah-Hartman
From: Heiner Kallweit commit 47dda78671a3d5cee3fb2229e37997d2ac8a3b54 upstream. Some firmware files trigger a PHY soft reset and don't wait for it to be finished. PHY register writes directly after applying the firmware may fail or provide unexpected results therefore. Fix this by waiting for

[PATCH 5.8 069/124] vmxnet3: fix cksum offload issues for non-udp tunnels

2020-10-12 Thread Greg Kroah-Hartman
From: Ronak Doshi [ Upstream commit 1dac3b1bc66dc68dbb0c9f43adac71a7d0a0331a ] Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, the inner offload capability is to be restrictued to UDP tunnels. This patch fixes the

[PATCH 5.8 016/124] splice: teach splice pipe reading about empty pipe buffers

2020-10-12 Thread Greg Kroah-Hartman
From: Linus Torvalds commit d1a819a2ec2d3b5e6a8f8a9f67386bda0ad315bc upstream. Tetsuo Handa reports that splice() can return 0 before the real EOF, if the data in the splice source pipe is an empty pipe buffer. That empty pipe buffer case doesn't happen in any normal situation, but you can

[PATCH 5.8 067/124] ice: fix memory leak if register_netdev_fails

2020-10-12 Thread Greg Kroah-Hartman
From: Jacob Keller [ Upstream commit 135f4b9e9340dadb78e9737bb4eb9817b9c89dac ] The ice_setup_pf_sw function can cause a memory leak if register_netdev fails, due to accidentally failing to free the VSI rings. Fix the memory leak by using ice_vsi_release, ensuring we actually go through the

[PATCH 5.8 072/124] 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

[PATCH 5.8 025/124] 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:

[PATCH 5.8 062/124] hinic: fix wrong return value of mac-set cmd

2020-10-12 Thread Greg Kroah-Hartman
From: Luo bin [ Upstream commit f68910a8056f9451ee9fe7e1b962f7d90d326ad3 ] It should also be regarded as an error when hw return status=4 for PF's setting mac cmd. Only if PF return status=4 to VF should this cmd be taken special treatment. Fixes: 7dd29ee12865 ("hinic: add sriov feature

[PATCH 5.8 068/124] ice: fix memory leak in ice_vsi_setup

2020-10-12 Thread Greg Kroah-Hartman
From: Jacob Keller [ Upstream commit f6a07271bb1535d9549380461437cc48d9e19958 ] During ice_vsi_setup, if ice_cfg_vsi_lan fails, it does not properly release memory associated with the VSI rings. If we had used devres allocations for the rings, this would be ok. However, we use kzalloc and

[PATCH 5.8 065/124] iavf: use generic power management

2020-10-12 Thread Greg Kroah-Hartman
From: Vaibhav Gupta [ Upstream commit bc5cbd73eb493944b8665dc517f684c40eb18a4a ] With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. The required operations

[PATCH 5.8 034/124] 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

[PATCH 5.8 020/124] platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models

2020-10-12 Thread Greg Kroah-Hartman
From: Hans de Goede commit 1797d588af15174d4a4e7159dac8c800538e4f8c upstream. Commit b0dbd97de1f1 ("platform/x86: asus-wmi: Add support for SW_TABLET_MODE") added support for reporting SW_TABLET_MODE using the Asus 0x00120063 WMI-device-id to see if various transformer models were docked into

[PATCH 5.4 31/85] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation

2020-10-12 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 6d4572a9d71d5fc2affee0258d8582d39859188c upstream. [BUG] When the data space is exhausted, even if the inode has NOCOW attribute, we will still refuse to truncate unaligned range due to ENOSPC. The following script can reproduce it pretty easily: #!/bin/bash

[PATCH 5.8 070/124] net: stmmac: Fix clock handling on remove path

2020-10-12 Thread Greg Kroah-Hartman
From: Wong Vee Khee [ Upstream commit ac322f86b56cb99d1c4224c209095aa67647c967 ] While unloading the dwmac-intel driver, clk_disable_unprepare() is being called twice in stmmac_dvr_remove() and intel_eth_pci_remove(). This causes kernel panic on the second call. Removing the second call of

[PATCH 5.8 024/124] 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

[PATCH 5.8 039/124] 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

[PATCH 5.4 16/85] 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 5.4 41/85] 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

[PATCH 5.4 39/85] 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

[PATCH 5.8 050/124] drm/vmwgfx: Fix error handling in get_node

2020-10-12 Thread Greg Kroah-Hartman
From: Zack Rusin [ Upstream commit f54c4442893b8dfbd3aff8e903c54dfff1aef990 ] ttm_mem_type_manager_func.get_node was changed to return -ENOSPC instead of setting the node pointer to NULL. Unfortunately vmwgfx still had two places where it was explicitly converting -ENOSPC to 0 causing

[PATCH 5.4 09/85] 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 =

[PATCH 5.4 18/85] bpf: Prevent .BTF section elimination

2020-10-12 Thread Greg Kroah-Hartman
From: Tony Ambardar commit 65c204398928f9c79f1a29912b410439f7052635 upstream. Systems with memory or disk constraints often reduce the kernel footprint by configuring LD_DEAD_CODE_DATA_ELIMINATION. However, this can result in removal of any BTF information. Use the KEEP() macro to preserve the

[PATCH 5.4 50/85] 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

[PATCH 5.4 51/85] xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate

2020-10-12 Thread Greg Kroah-Hartman
From: Antony Antony [ Upstream commit 7aa05d304785204703a67a6aa7f1db402889a172 ] XFRMA_SEC_CTX was not cloned from the old to the new. Migrate this attribute during XFRMA_MSG_MIGRATE v1->v2: - return -ENOMEM on error v2->v3: - fix return type to int Fixes: 80c9abaabf42 ("[XFRM]: Extension

[PATCH 5.4 43/85] 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 5.4 65/85] net/mlx5: Avoid possible free of command entry while timeout comp handler

2020-10-12 Thread Greg Kroah-Hartman
From: Eran Ben Elisha [ Upstream commit 50b2412b7e7862c5af0cbf4b10d93bc5c712d021 ] Upon command completion timeout, driver simulates a forced command completion. In a rare case where real interrupt for that command arrives simultaneously, it might release the command entry while the forced

[PATCH 5.4 62/85] r8169: fix RTL8168f/RTL8411 EPHY config

2020-10-12 Thread Greg Kroah-Hartman
From: Heiner Kallweit [ Upstream commit 709a16be0593c08190982cfbdca6df95e6d5823b ] Mistakenly bit 2 was set instead of bit 3 as in the vendor driver. Fixes: a7a92cf81589 ("r8169: sync PCIe PHY init with vendor driver 8.047.01") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller

[PATCH 5.4 68/85] net/mlx5e: Fix VLAN cleanup flow

2020-10-12 Thread Greg Kroah-Hartman
From: Aya Levin [ Upstream commit 8c7353b6f716436ad0bfda2b5c5524ab2dde5894 ] Prior to this patch unloading an interface in promiscuous mode with RX VLAN filtering feature turned off - resulted in a warning. This is due to a wrong condition in the VLAN rules cleanup flow, which left the any-vid

[PATCH 5.4 64/85] virtio-net: dont disable guest csum when disable LRO

2020-10-12 Thread Greg Kroah-Hartman
From: Tonghao Zhang [ Upstream commit 1a03b8a35a957f9f38ecb8a97443b7380bbf6a8b ] Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes:

[PATCH 5.4 69/85] net/mlx5e: Fix VLAN create flow

2020-10-12 Thread Greg Kroah-Hartman
From: Aya Levin [ Upstream commit d4a16052bccdd695982f89d815ca075825115821 ] When interface is attached while in promiscuous mode and with VLAN filtering turned off, both configurations are not respected and VLAN filtering is performed. There are 2 flows which add the any-vid rules during

[PATCH 5.4 49/85] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate

2020-10-12 Thread Greg Kroah-Hartman
From: Antony Antony [ Upstream commit 545e5c571662b1cd79d9588f9d3b6e36985b8007 ] XFRMA_SET_MARK and XFRMA_SET_MARK_MASK was not cloned from the old to the new. Migrate these two attributes during XFRMA_MSG_MIGRATE Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction

[PATCH 5.4 40/85] i2c: meson: fix clock setting overwrite

2020-10-12 Thread Greg Kroah-Hartman
From: Jerome Brunet commit 28683e847e2f20eed22cdd24f185d7783db396d3 upstream. When the slave address is written in do_start(), SLAVE_ADDR is written completely. This may overwrite some setting related to the clock rate or signal filtering. Fix this by writing only the bits related to slave

[PATCH 5.4 48/85] iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb()

2020-10-12 Thread Greg Kroah-Hartman
From: Lu Baolu [ Upstream commit 1a3f2fd7fc4e8f24510830e265de2ffb8e3300d2 ] Lock(>lock) without disabling irq causes lockdep warnings. [ 12.703950] [ 12.703962] WARNING: possible irq lock inversion dependency detected [ 12.703975]

[PATCH 5.4 71/85] rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()

2020-10-12 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit 9a059cd5ca7d9c5c4ca5a6e755cf72f230176b6a ] If rxrpc_read() (which allows KEYCTL_READ to read a key), sees a token of a type it doesn't recognise, it can BUG in a couple of places, which is unnecessary as it can easily get back to userspace. Fix this to

[PATCH 5.4 66/85] net/mlx5: Fix request_irqs error flow

2020-10-12 Thread Greg Kroah-Hartman
From: Maor Gottlieb [ Upstream commit 732ebfab7fe96b7ac9a3df3208f14752a4bb6db3 ] Fix error flow handling in request_irqs which try to free irq that we failed to request. It fixes the below trace. WARNING: CPU: 1 PID: 7587 at kernel/irq/manage.c:1684 free_irq+0x4d/0x60 CPU: 1 PID: 7587 Comm:

[PATCH 5.4 67/85] net/mlx5e: Add resiliency in Striding RQ mode for packets larger than MTU

2020-10-12 Thread Greg Kroah-Hartman
From: Aya Levin [ Upstream commit c3c9402373fe20e2d08c04f437ce4dcd252cffb2 ] Prior to this fix, in Striding RQ mode the driver was vulnerable when receiving packets in the range (stride size - headroom, stride size]. Where stride size is calculated by mtu+headroom+tailroom aligned to the

[PATCH 5.4 52/85] 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]:

[PATCH 5.4 45/85] 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 5.4 47/85] 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]

[PATCH 5.4 63/85] net: usb: ax88179_178a: fix missing stop entry in driver_info

2020-10-12 Thread Greg Kroah-Hartman
From: Wilken Gottwalt [ Upstream commit 9666ea66a74adfe295cb3a8760c76e1ef70f9caf ] Adds the missing .stop entry in the Belkin driver_info structure. Fixes: e20bd60bf62a ("net: usb: asix88179_178a: Add support for the Belkin B2B128") Signed-off-by: Wilken Gottwalt Signed-off-by: David S.

[PATCH 5.4 72/85] rxrpc: Fix some missing _bh annotations on locking conn->state_lock

2020-10-12 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit fa1d113a0f96f9ab7e4fe4f8825753ba1e34a9d3 ] conn->state_lock may be taken in softirq mode, but a previous patch replaced an outer lock in the response-packet event handling code, and lost the _bh from that when doing so. Fix this by applying the _bh

[PATCH 5.4 74/85] 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

[PATCH 5.4 70/85] 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

[PATCH 5.4 73/85] rxrpc: The server keyring isnt network-namespaced

2020-10-12 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit fea99111244bae44e7d82a973744d27ea1567814 ] The keyring containing the server's tokens isn't network-namespaced, so it shouldn't be looked up with a network namespace. It is expected to be owned specifically by the server, so namespacing is unnecessary.

Re: Missing [GIT PULL] request for

2020-10-12 Thread Ingo Molnar
* Sedat Dilek wrote: > Hi, > > yesterday, I saw Ingo tagged "locking-urgent-2020-10-11" in tip Git. > > Did you drop it or was this for Linux v5.9 final and the git-pull > request was simply forgotten? > > Just curious. So I ran the pull request script to send the tree to Linus, but on

[PATCH 5.4 46/85] 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))

[PATCH 5.4 44/85] 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:

[PATCH 5.4 56/85] iavf: use generic power management

2020-10-12 Thread Greg Kroah-Hartman
From: Vaibhav Gupta [ Upstream commit bc5cbd73eb493944b8665dc517f684c40eb18a4a ] With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. The required operations

[PATCH 5.4 60/85] mdio: fix mdio-thunder.c dependency & build error

2020-10-12 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit 7dbbcf496f2a4b6d82cfc7810a0746e160b79762 ] Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. Fixes this build error: ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': drivers/net/phy/mdio-thunder.c:78: undefined reference

Re: [PATCH] spi: imx: Revert "spi: imx: enable runtime pm support"

2020-10-12 Thread Mark Brown
On Mon, Oct 12, 2020 at 03:28:21PM +0200, Sascha Hauer wrote: > On Mon, Oct 12, 2020 at 12:59:34PM +0200, Christian Eggers wrote: > > What is the benefit of controlling the SPI clock with runtime PM instead of > > doing it manually? > The clocks are reconfigured less frequently with pm_runtime.

[PATCH 5.4 61/85] mlxsw: spectrum_acl: Fix mlxsw_sp_acl_tcam_group_add()s error path

2020-10-12 Thread Greg Kroah-Hartman
From: Ido Schimmel [ Upstream commit 72865028582a678be1e05240e55d452e5c258eca ] If mlxsw_sp_acl_tcam_group_id_get() fails, the mutex initialized earlier is not destroyed. Fix this by initializing the mutex after calling the function. This is symmetric to mlxsw_sp_acl_tcam_group_del(). Fixes:

[PATCH 5.4 55/85] xfrm: Use correct address family in xfrm_state_find

2020-10-12 Thread Greg Kroah-Hartman
From: Herbert Xu [ Upstream commit e94ee171349db84c7cfdc5fefbebe414054d0924 ] The struct flowi must never be interpreted by itself as its size depends on the address family. Therefore it must always be grouped with its original family value. In this particular instance, the original family

[PATCH 5.4 54/85] platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP

2020-10-12 Thread Greg Kroah-Hartman
From: Necip Fazil Yildiran [ Upstream commit afdd1ebb72051e8b6b83c4d7dc542a9be0e1352d ] When FUJITSU_LAPTOP is enabled and NEW_LEDS is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by

[PATCH 5.4 53/85] net: stmmac: removed enabling eee in EEE set callback

2020-10-12 Thread Greg Kroah-Hartman
From: Voon Weifeng [ Upstream commit 7241c5a697479c7d0c5a96595822cdab750d41ae ] EEE should be only be enabled during stmmac_mac_link_up() when the link are up and being set up properly. set_eee should only do settings configuration and disabling the eee. Without this fix, turning on EEE using

[PATCH 5.4 58/85] net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop

2020-10-12 Thread Greg Kroah-Hartman
From: Ivan Khoronzhuk [ Upstream commit 4663ff60257aec4ee1e2e969a7c046f0aff35ab8 ] To start also "phy state machine", with UP state as it should be, the phy_start() has to be used, in another case machine even is not triggered. After this change negotiation is supposed to be triggered by SM

[PATCH 5.4 32/85] 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

[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

[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.

[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

[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()

[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

[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

[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,

[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:

[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

[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

[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

[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

[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.

[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

[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

[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

[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

[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

[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 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

[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

[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

[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

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

[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

[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

[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

[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

[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

[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))

[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]

[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

[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:

[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 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

[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:

[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

<    7   8   9   10   11   12   13   14   15   16   >