[PATCH AUTOSEL 4.4 30/64] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by: A

Re: [PATCH v2 -next] vdpa: mlx5: change Kconfig depends to fix build errors

2020-09-17 Thread Jason Wang
onfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200917.orig/drivers/vdpa/Kconfig +++ linux-next-20200917/drivers/vdpa/Kconfig @@ -31,7 +31,7 @@ config IFCVF config MLX5_VDPA bool "MLX5 VDPA support library for ConnectX devices" - depends on

[PATCH AUTOSEL 4.4 14/64] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.4 13/64] neigh_stat_seq_next() should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.9 77/90] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks th

[PATCH AUTOSEL 4.9 71/90] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of Comma

[PATCH AUTOSEL 4.9 69/90] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm "a

[PATCH AUTOSEL 4.9 59/90] svcrdma: Fix leak of transport addresses

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 1a33d8a284b1e85e03b8c7b1ea8fb985fccd1d71 ] Kernel memory leak detected: unreferenced object 0x49cdf480 (size 8): comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s) hex dump (first 8 bytes): 30 00 cd 49 88 88 ff ff

Re: [PATCH v3 net-next 5/9] net: dsa: mv88e6xxx: Move devlink code into its own file

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: There will soon be more devlink code. Move the existing code into a file of its own, before we start adding this new code. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v3 net-next 6/9] net: dsa: mv88e6xxx: Create helper for FIDs in use

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: Refactor the code in mv88e6xxx_atu_new() which builds a bitmaps of FIDs in use into a helper function. This will be reused by the devlink code when dumping the ATU. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 4.9 58/90] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL chara

[PATCH AUTOSEL 4.9 48/90] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and after

[PATCH AUTOSEL 4.9 45/90] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by: A

[PATCH AUTOSEL 4.9 30/90] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task syz-fuzze

[PATCH AUTOSEL 4.9 42/90] bpf: Remove recursion prevention from rcu free callback

2020-09-17 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit 8a37963c7ac9ecb7f86f8ebda020e3f8d6d7b8a0 ] If an element is freed via RCU then recursion into BPF instrumentation functions is not a concern. The element is already detached from the map and the RCU callback does not hold any locks on which a kprobe, perf

[PATCH AUTOSEL 4.9 27/90] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4

[PATCH AUTOSEL 4.9 19/90] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.9 28/90] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

[PATCH AUTOSEL 4.14 106/127] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks th

[PATCH AUTOSEL 4.14 098/127] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of Comma

[PATCH AUTOSEL 4.14 094/127] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm "a

Re: [PATCH v3 net-next 7/9] net: dsa: mv88e6xxx: Add devlink regions

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: Allow the global registers, and the ATU to be snapshot via devlink regions. It is later planned to add support for the port registers. v2: Remove left over debug prints Comment ATU format is generic for mv88e6xxx, not wider v3: Make use of ops structur

[PATCH AUTOSEL 4.14 077/127] svcrdma: Fix leak of transport addresses

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 1a33d8a284b1e85e03b8c7b1ea8fb985fccd1d71 ] Kernel memory leak detected: unreferenced object 0x49cdf480 (size 8): comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s) hex dump (first 8 bytes): 30 00 cd 49 88 88 ff ff

Re: [PATCH v3 net-next 8/9] net: dsa: wire up devlink info get

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: Allow the DSA drivers to implement the devlink call to get info info, e.g. driver name, firmware version, ASIC ID, etc. v2: Combine declaration and the assignment on a single line. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 4.14 076/127] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL chara

Re: [PATCH v3 net-next 9/9] net: dsa: mv88e6xxx: Implement devlink info get callback

2020-09-17 Thread Florian Fainelli
On 9/9/2020 4:58 PM, Andrew Lunn wrote: Return the driver name and the asic.id with the switch name. Reviewed-by: Jakub Kicinski Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 4.14 061/127] ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read

2020-09-17 Thread Sasha Levin
From: Wen Gong [ Upstream commit 402f2992b4d62760cce7c689ff216ea3bf4d6e8a ] When use command to read values, it crashed. command: dd if=/sys/kernel/debug/ieee80211/phy0/ath10k/mem_value count=1 bs=4 skip=$((0x100233)) It will call to ath10k_sdio_hif_diag_read with address = 0x4008cc and buf_l

Re: [PATCH v2 net 7/8] net: mscc: ocelot: unregister net devices on unbind

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean This driver was not unregistering its network interfaces on unbind. Now it is. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 4.14 056/127] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by: A

Re: [PATCH v2 net 6/8] net: mscc: ocelot: refactor ports parsing code into a dedicated function

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean mscc_ocelot_probe() is already pretty large and hard to follow. So move the code for parsing ports in a separate function. This makes it easier for the next patch to just call mscc_ocelot_release_ports from the error path of

[PATCH AUTOSEL 4.14 053/127] bpf: Remove recursion prevention from rcu free callback

2020-09-17 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit 8a37963c7ac9ecb7f86f8ebda020e3f8d6d7b8a0 ] If an element is freed via RCU then recursion into BPF instrumentation functions is not a concern. The element is already detached from the map and the RCU callback does not hold any locks on which a kprobe, perf

[PATCH AUTOSEL 4.14 039/127] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task syz-fuzze

Re: [PATCH v2 net 4/8] net: mscc: ocelot: check for errors on memory allocation of ports

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean Do not proceed probing if we couldn't allocate memory for the ports array, just error out. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli -- Florian

[PATCH v3 -next] vdpa: mlx5: change Kconfig depends to fix build errors

2020-09-17 Thread Randy Dunlap
config |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200917.orig/drivers/vdpa/Kconfig +++ linux-next-20200917/drivers/vdpa/Kconfig @@ -31,7 +31,7 @@ config IFCVF config MLX5_VDPA bool "MLX5 VDPA support library for ConnectX devices" - depends on M

[PATCH AUTOSEL 4.14 042/127] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendms

Re: [PATCH v2 net 8/8] net: mscc: ocelot: deinitialize only initialized ports

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean Currently mscc_ocelot_init_ports() will skip initializing a port when it doesn't have a phy-handle, so the ocelot->ports[port] pointer will be NULL. Take this into consideration when tearing down the driver, and add a new fun

Re: [PATCH v2 net 5/8] net: mscc: ocelot: error checking when calling ocelot_init()

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean ocelot_init() allocates memory, resets the switch and polls for a status register, things which can fail. Stop probing the driver in that case, and propagate the error result. Signed-off-by: Vladimir Oltean Reviewed-by: Hor

[PATCH AUTOSEL 4.14 034/127] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4

[PATCH AUTOSEL 4.14 037/127] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

[PATCH AUTOSEL 4.14 024/127] neigh_stat_seq_next() should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH net-next] Revert "ibmvnic: remove never executed if statement"

2020-09-17 Thread Lijun Pan
This reverts commit 550f4d46aff6fe57c9b1c6719c3c9de2237d7ac2. adapter->from_passive_init may be changed in ibmvnic_handle_crq while ibmvnic_reset_init is waiting for the completion of adapter->init_done. Signed-off-by: Lijun Pan --- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++ 1 file changed,

Re: [PATCH v2 net 2/8] net: mscc: ocelot: add locking for the port TX timestamp ID

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean The ocelot_port->ts_id is used to: (a) populate skb->cb[0] for matching the TX timestamp in the PTP IRQ with an skb. (b) populate the REW_OP from the injection header of the ongoing skb. Only then is ocelot_port->ts_id i

[PATCH AUTOSEL 4.14 025/127] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

Re: [PATCH v2 net 3/8] net: dsa: seville: fix buffer size of the queue system

2020-09-17 Thread Florian Fainelli
On 9/17/2020 6:07 PM, Vladimir Oltean wrote: From: Vladimir Oltean The VSC9953 Seville switch has 2 megabits of buffer split into 4360 words of 60 bytes each. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli -- Florian

[PATCH AUTOSEL 4.19 205/206] net: openvswitch: use div_u64() for 64-by-32 divisions

2020-09-17 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit 659d4587fe7233bfdff303744b20d6f41ad04362 ] Compile the kernel for arm 32 platform, the build warning found. To fix that, should use div_u64() for divisions. | net/openvswitch/meter.c:396: undefined reference to `__udivdi3' [add more commit msg, change repor

[PATCH AUTOSEL 4.19 187/206] wlcore: fix runtime pm imbalance in wlcore_regdomain_config

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 282a04bf1d8029eb98585cb5db3fd70fe8bc91f7 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Li

[PATCH AUTOSEL 4.19 186/206] wlcore: fix runtime pm imbalance in wl1271_tx_work

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 9604617e998b49f7695fea1479ed82421ef8c9f0 ] There are two error handling paths in this functon. When wlcore_tx_work_locked() returns an error code, we should decrease the runtime PM usage counter the same way as the error handling path beginning from pm_runtime

[PATCH AUTOSEL 4.19 183/206] perf metricgroup: Free metric_events on error

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit a159e2fe89b4d1f9fb54b0ae418b961e239bf617 ] Avoid a simple memory leak. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Cong Wang Cc: Daniel Borkmann Cc: Jin Yao Cc: Jiri Olsa Cc: John Fast

[PATCH AUTOSEL 4.19 170/206] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks th

[PATCH AUTOSEL 4.19 162/206] tipc: fix memory leak in service subscripting

2020-09-17 Thread Sasha Levin
From: Tuong Lien [ Upstream commit 0771d7df819284d46cf5cfb57698621b503ec17f ] Upon receipt of a service subscription request from user via a topology connection, one 'sub' object will be allocated in kernel, so it will be able to send an event of the service if any to the user correspondingly th

[PATCH AUTOSEL 4.19 155/206] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm "a

[PATCH AUTOSEL 4.19 149/206] net: openvswitch: use u64 for meter bucket

2020-09-17 Thread Sasha Levin
From: Tonghao Zhang [ Upstream commit e57358873bb5d6caa882b9684f59140912b37dde ] When setting the meter rate to 4+Gbps, there is an overflow, the meters don't work as expected. Cc: Pravin B Shelar Cc: Andy Zhou Signed-off-by: Tonghao Zhang Acked-by: Pravin B Shelar Signed-off-by: David S. M

[PATCH AUTOSEL 4.19 131/206] svcrdma: Fix leak of transport addresses

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 1a33d8a284b1e85e03b8c7b1ea8fb985fccd1d71 ] Kernel memory leak detected: unreferenced object 0x49cdf480 (size 8): comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s) hex dump (first 8 bytes): 30 00 cd 49 88 88 ff ff

[PATCH AUTOSEL 4.19 130/206] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL chara

[PATCH AUTOSEL 4.19 104/206] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and after

[PATCH AUTOSEL 4.19 102/206] ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read

2020-09-17 Thread Sasha Levin
From: Wen Gong [ Upstream commit 402f2992b4d62760cce7c689ff216ea3bf4d6e8a ] When use command to read values, it crashed. command: dd if=/sys/kernel/debug/ieee80211/phy0/ath10k/mem_value count=1 bs=4 skip=$((0x100233)) It will call to ath10k_sdio_hif_diag_read with address = 0x4008cc and buf_l

[PATCH AUTOSEL 4.19 087/206] bpf: Remove recursion prevention from rcu free callback

2020-09-17 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit 8a37963c7ac9ecb7f86f8ebda020e3f8d6d7b8a0 ] If an element is freed via RCU then recursion into BPF instrumentation functions is not a concern. The element is already detached from the map and the RCU callback does not hold any locks on which a kprobe, perf

[PATCH AUTOSEL 4.19 079/206] mt76: clear skb pointers from rx aggregation reorder buffer during cleanup

2020-09-17 Thread Sasha Levin
From: Felix Fietkau [ Upstream commit 9379df2fd9234e3b67a23101c2370c99f6af6d77 ] During the cleanup of the aggregation session, a rx handler (or release timer) on another CPU might still hold a pointer to the reorder buffer and could attempt to release some packets. Clearing pointers during clea

[PATCH AUTOSEL 4.19 071/206] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendms

[PATCH AUTOSEL 4.19 065/206] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

[PATCH AUTOSEL 4.19 068/206] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task syz-fuzze

[PATCH AUTOSEL 4.19 061/206] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4

[PATCH net-next] net: phy: realtek: enable ALDPS to save power for RTL8211F

2020-09-17 Thread Jisheng Zhang
Enable ALDPS function to save power when link down. Signed-off-by: Jisheng Zhang --- drivers/net/phy/realtek.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 95dbe5e8e1d8..961570186822 100644 --- a/drivers/net/phy/realtek.c

[PATCH AUTOSEL 4.19 044/206] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.19 048/206] sctp: move trace_sctp_probe_path into sctp_outq_sack

2020-09-17 Thread Sasha Levin
From: Kevin Kou [ Upstream commit f643ee295c1c63bc117fb052d4da681354d6f732 ] The original patch bringed in the "SCTP ACK tracking trace event" feature was committed at Dec.20, 2017, it replaced jprobe usage with trace events, and bringed in two trace events, one is TRACE_EVENT(sctp_probe), anoth

[PATCH AUTOSEL 4.19 017/206] net: silence data-races on sk_backlog.tail

2020-09-17 Thread Sasha Levin
From: Eric Dumazet [ Upstream commit 9ed498c6280a2f2b51d02df96df53037272ede49 ] sk->sk_backlog.tail might be read without holding the socket spinlock, we need to add proper READ_ONCE()/WRITE_ONCE() to silence the warnings. KCSAN reported : BUG: KCSAN: data-race in tcp_add_backlog / tcp_recvmsg

[PATCH AUTOSEL 4.19 004/206] ath10k: fix array out-of-bounds access

2020-09-17 Thread Sasha Levin
From: Miaoqing Pan [ Upstream commit c5329b2d5b8b4e41be14d31ee8505b4f5607bf9b ] If firmware reports rate_max > WMI_TPC_RATE_MAX(WMI_TPC_FINAL_RATE_MAX) or num_tx_chain > WMI_TPC_TX_N_CHAIN, it will cause array out-of-bounds access, so print a warning and reset to avoid memory corruption. Tested

[PATCH AUTOSEL 4.19 005/206] ath10k: fix memory leak for tpc_stats_final

2020-09-17 Thread Sasha Levin
From: Miaoqing Pan [ Upstream commit 486a8849843455298d49e694cca9968336ce2327 ] The memory of ar->debug.tpc_stats_final is reallocated every debugfs reading, it should be freed in ath10k_debug_destroy() for the last allocation. Tested HW: QCA9984 Tested FW: 10.4-3.9.0.2-00035 Signed-off-by: Mi

[PATCH AUTOSEL 5.4 324/330] mt76: fix LED link time failure

2020-09-17 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit d68f4e43a46ff1f772ff73085f96d44eb4163e9d ] The mt76_led_cleanup() function is called unconditionally, which leads to a link error when CONFIG_LEDS is a loadable module or disabled but mt76 is built-in: drivers/net/wireless/mediatek/mt76/mac80211.o: In funct

[PATCH AUTOSEL 5.4 315/330] mac80211: skip mpath lookup also for control port tx

2020-09-17 Thread Sasha Levin
From: Markus Theil [ Upstream commit 5af7fef39d7952c0f5551afa7b821ee7b6c9dd3d ] When using 802.1X over mesh networks, at first an ordinary mesh peering is established, then the 802.1X EAPOL dialog happens, afterwards an authenticated mesh peering exchange (AMPE) happens, finally the peering is c

[PATCH AUTOSEL 5.4 301/330] wlcore: fix runtime pm imbalance in wlcore_regdomain_config

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 282a04bf1d8029eb98585cb5db3fd70fe8bc91f7 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Li

[PATCH AUTOSEL 5.4 296/330] perf metricgroup: Free metric_events on error

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit a159e2fe89b4d1f9fb54b0ae418b961e239bf617 ] Avoid a simple memory leak. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Cong Wang Cc: Daniel Borkmann Cc: Jin Yao Cc: Jiri Olsa Cc: John Fast

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-17 Thread Kehuan Feng
Sorry, guys, the experiment environment is no longer existing now. We finally use fq_codel for online product. Cong Wang 于2020年9月18日周五 上午3:52写道: > > On Sun, Sep 13, 2020 at 7:10 PM Yunsheng Lin wrote: > > > > On 2020/9/11 4:19, Cong Wang wrote: > > > On Thu, Sep 3, 2020 at 8:21 PM Kehuan Feng w

[PATCH AUTOSEL 5.4 280/330] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks th

[PATCH AUTOSEL 5.4 271/330] svcrdma: Fix backchannel return code

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit ea740bd5f58e2912e74f401fd01a9d6aa985ca05 ] Way back when I was writing the RPC/RDMA server-side backchannel code, I misread the TCP backchannel reply handler logic. When svc_tcp_recvfrom() successfully receives a backchannel reply, it does not return -EAGAIN.

[PATCH AUTOSEL 5.4 252/330] devlink: Fix reporter's recovery condition

2020-09-17 Thread Sasha Levin
From: Aya Levin [ Upstream commit bea0c5c942d3b4e9fb6ed45f6a7de74c6b112437 ] Devlink health core conditions the reporter's recovery with the expiration of the grace period. This is not relevant for the first recovery. Explicitly demand that the grace period will only apply to recoveries other th

[PATCH AUTOSEL 5.4 253/330] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm "a

[PATCH AUTOSEL 5.4 261/330] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of Comma

[PATCH AUTOSEL 5.4 250/330] dpaa2-eth: fix error return code in setup_dpni()

2020-09-17 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 97fff7c8de1e54e5326dfeb66085796864bceb64 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- dr

[PATCH AUTOSEL 5.4 229/330] SUNRPC: Don't start a timer on an already queued rpc task

2020-09-17 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit 1fab7dc477241c12f977955aa6baea7938b6f08d ] Move the test for whether a task is already queued to prevent corruption of the timer list in __rpc_sleep_on_priority_timeout(). Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- net/sunrpc/sched.c

[PATCH AUTOSEL 5.4 208/330] brcmfmac: Fix double freeing in the fmac usb data path

2020-09-17 Thread Sasha Levin
From: Raveendran Somu [ Upstream commit 78179869dc3f5c0059bbf5d931a2717f1ad97ecd ] When the brcmf_fws_process_skb() fails to get hanger slot for queuing the skb, it tries to free the skb. But the caller brcmf_netdev_start_xmit() of that funciton frees the packet on error return value. This cause

[PATCH AUTOSEL 5.4 215/330] netfilter: nf_tables: silence a RCU-list warning in nft_table_lookup()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 0a6a9515fe390976cd762c52d8d4f446d7a14285 ] It is safe to traverse &net->nft.tables with &net->nft.commit_mutex held using list_for_each_entry_rcu(). Silence the PROVE_RCU_LIST false positive, WARNING: suspicious RCU usage net/netfilter/nf_tables_api.c:523 RCU-li

[PATCH AUTOSEL 5.4 213/330] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL chara

[PATCH AUTOSEL 5.4 214/330] svcrdma: Fix leak of transport addresses

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 1a33d8a284b1e85e03b8c7b1ea8fb985fccd1d71 ] Kernel memory leak detected: unreferenced object 0x49cdf480 (size 8): comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s) hex dump (first 8 bytes): 30 00 cd 49 88 88 ff ff

[PATCH AUTOSEL 5.4 195/330] net: axienet: Propagate failure of DMA descriptor setup

2020-09-17 Thread Sasha Levin
From: Andre Przywara [ Upstream commit ee44d0b78839b21591501424fd3cb3648cc803b5 ] When we fail allocating the DMA buffers in axienet_dma_bd_init(), we report this error, but carry on with initialisation nevertheless. This leads to a kernel panic when the driver later wants to send a packet, as

[PATCH AUTOSEL 5.4 189/330] r8169: improve RTL8168b FIFO overflow workaround

2020-09-17 Thread Sasha Levin
From: Heiner Kallweit [ Upstream commit 6b02e407cbf8d421477ebb7792cd6380affcd313 ] So far only the reset bit it set, but the handler executing the reset is not scheduled. Therefore nothing will happen until some other action schedules the handler. Improve this by ensuring that the handler is sch

[PATCH AUTOSEL 5.4 194/330] net: axienet: Convert DMA error handler to a work queue

2020-09-17 Thread Sasha Levin
From: Andre Przywara [ Upstream commit 24201a64770afe2e17050b2ab9e8c0e24e9c23b2 ] The DMA error handler routine is currently a tasklet, scheduled to run after the DMA error IRQ was handled. However it needs to take the MDIO mutex, which is not allowed to do in a tasklet. A kernel (with debug opt

[PATCH AUTOSEL 5.4 168/330] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and after

[PATCH AUTOSEL 5.4 151/330] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by: A

[PATCH AUTOSEL 5.4 145/330] iavf: use tc_cls_can_offload_and_chain0() instead of chain check

2020-09-17 Thread Sasha Levin
From: Jiri Pirko [ Upstream commit bb0858d8bc828ebc3eaa90be02a0f32bca3c2351 ] Looks like the iavf code actually experienced a race condition, when a developer took code before the check for chain 0 was put to helper. So use tc_cls_can_offload_and_chain0() helper instead of direct check and move

[PATCH AUTOSEL 5.4 139/330] bpf: Remove recursion prevention from rcu free callback

2020-09-17 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit 8a37963c7ac9ecb7f86f8ebda020e3f8d6d7b8a0 ] If an element is freed via RCU then recursion into BPF instrumentation functions is not a concern. The element is already detached from the map and the RCU callback does not hold any locks on which a kprobe, perf

[PATCH AUTOSEL 5.4 129/330] mt76: clear skb pointers from rx aggregation reorder buffer during cleanup

2020-09-17 Thread Sasha Levin
From: Felix Fietkau [ Upstream commit 9379df2fd9234e3b67a23101c2370c99f6af6d77 ] During the cleanup of the aggregation session, a rx handler (or release timer) on another CPU might still hold a pointer to the reorder buffer and could attempt to release some packets. Clearing pointers during clea

[PATCH AUTOSEL 5.4 130/330] mt76: fix handling full tx queues in mt76_dma_tx_queue_skb_raw

2020-09-17 Thread Sasha Levin
From: Felix Fietkau [ Upstream commit 93eaec7625f13cffb593b471405b017c7e64d4ee ] Fixes a theoretical issue where it could potentially overwrite an existing descriptor entry (and leaking its skb) Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/dm

[PATCH AUTOSEL 5.4 117/330] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendms

[PATCH AUTOSEL 5.4 114/330] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task syz-fuzze

[PATCH AUTOSEL 5.4 107/330] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4

[PATCH AUTOSEL 5.4 090/330] sctp: move trace_sctp_probe_path into sctp_outq_sack

2020-09-17 Thread Sasha Levin
From: Kevin Kou [ Upstream commit f643ee295c1c63bc117fb052d4da681354d6f732 ] The original patch bringed in the "SCTP ACK tracking trace event" feature was committed at Dec.20, 2017, it replaced jprobe usage with trace events, and bringed in two trace events, one is TRACE_EVENT(sctp_probe), anoth

[PATCH AUTOSEL 5.4 081/330] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 5.4 078/330] tipc: fix link overflow issue at socket shutdown

2020-09-17 Thread Sasha Levin
From: Tuong Lien [ Upstream commit 49afb806cb650dd1f06f191994f3aa657d264009 ] When a socket is suddenly shutdown or released, it will reject all the unreceived messages in its receive queue. This applies to a connected socket too, whereas there is only one 'FIN' message required to be sent back

[PATCH AUTOSEL 5.4 061/330] SUNRPC: Capture completion of all RPC tasks

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit a264abad51d8ecb7954a2f6d9f1885b38daffc74 ] RPC tasks on the backchannel never invoke xprt_complete_rqst(), so there is no way to report their tk_status at completion. Also, any RPC task that exits via rpc_exit_task() before it is replied to will also disappear

<    1   2   3   4   5   >