linux/drivers/net
Alex Elder e11ec2b868 net: ipa: only reset hashed tables when supported
Last year, the code that manages GSI channel transactions switched
from using spinlock-protected linked lists to using indexes into the
ring buffer used for a channel.  Recently, Google reported seeing
transaction reference count underflows occasionally during shutdown.

Doug Anderson found a way to reproduce the issue reliably, and
bisected the issue to the commit that eliminated the linked lists
and the lock.  The root cause was ultimately determined to be
related to unused transactions being committed as part of the modem
shutdown cleanup activity.  Unused transactions are not normally
expected (except in error cases).

The modem uses some ranges of IPA-resident memory, and whenever it
shuts down we zero those ranges.  In ipa_filter_reset_table() a
transaction is allocated to zero modem filter table entries.  If
hashing is not supported, hashed table memory should not be zeroed.
But currently nothing prevents that, and the result is an unused
transaction.  Something similar occurs when we zero routing table
entries for the modem.

By preventing any attempt to clear hashed tables when hashing is not
supported, the reference count underflow is avoided in this case.

Note that there likely remains an issue with properly freeing unused
transactions (if they occur due to errors).  This patch addresses
only the underflows that Google originally reported.

Cc: <stable@vger.kernel.org> # 6.1.x
Fixes: d338ae28d8 ("net: ipa: kill all other transaction lists")
Tested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Alex Elder <elder@linaro.org>
Link: https://lore.kernel.org/r/20230724224055.1688854-1-elder@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-07-25 20:34:20 -07:00
..
appletalk
arcnet
bonding bonding: reset bond's flags when down link is P2P device 2023-07-25 09:16:17 +02:00
caif
can can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED 2023-07-20 11:12:45 +02:00
dsa net: dsa: microchip: correct KSZ8795 static MAC table access 2023-07-17 07:43:11 +01:00
ethernet net: stmmac: Apply redundant write work around on 4.xx too 2023-07-25 11:03:55 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Allocate rx indirection table size dynamically 2023-06-07 09:46:49 +01:00
ieee802154 Core WPAN changes: 2023-06-24 15:41:46 -07:00
ipa net: ipa: only reset hashed tables when supported 2023-07-25 20:34:20 -07:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
mctp mctp i2c: Switch back to use struct i2c_driver's .probe() 2023-06-13 20:46:20 -07:00
mdio mdio: mdio-mux-mmioreg: Use of_property_read_reg() to parse "reg" 2023-06-12 10:56:01 +01:00
netdevsim netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write() 2023-07-12 12:46:35 -07:00
pcs net: pcs: lynx: update PCS driver to use neg_mode 2023-06-22 19:41:01 -07:00
phy net: phy: marvell10g: fix 88x3310 power up 2023-07-23 11:47:07 +01:00
plip
ppp pptp: Fix fib lookup calls. 2023-07-04 19:39:30 +01:00
pse-pd
slip
team team: reset team's flags when down link is P2P device 2023-07-25 09:16:17 +02:00
thunderbolt
usb net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb 2023-07-13 20:37:23 -07:00
vmxnet3
vxlan vxlan: fix GRO with VXLAN-GPE 2023-07-24 10:47:09 +01:00
wan net: lapbether: only support ethernet devices 2023-06-15 08:55:22 +01:00
wireguard wireguard: timers: move to using timer_delete_sync 2023-07-03 09:17:52 +01:00
wireless wifi: rtw89: debug: fix error code in rtw89_debug_priv_send_h2c_set() 2023-07-12 17:52:37 -07:00
wwan Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
xen-netback asm-generic updates for 6.5 2023-07-06 10:06:04 -07:00
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c gtp: Fix use-after-free in __gtp_encap_destroy(). 2023-06-24 15:20:42 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: macsec: fix double free of percpu stats 2023-06-15 11:41:01 +01:00
macvlan.c macvlan: add forgotten nla_policy for IFLA_MACVLAN_BC_CUTOFF 2023-07-25 19:48:50 -07:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Fix module_init problem 2023-07-08 11:03:53 -04:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c net: move gso declarations and functions to their own files 2023-06-10 00:11:41 -07:00
tun.c
veth.c
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-08 11:35:14 -07:00
vrf.c vrf: Fix lockdep splat in output path 2023-07-18 12:49:57 +02:00
vsockmon.c
xen-netfront.c