linux/drivers/net
Robert Hancock 0bf476fc36 net: macb: Fix lost RX packet wakeup race in NAPI receive
There is an oddity in the way the RSR register flags propagate to the
ISR register (and the actual interrupt output) on this hardware: it
appears that RSR register bits only result in ISR being asserted if the
interrupt was actually enabled at the time, so enabling interrupts with
RSR bits already set doesn't trigger an interrupt to be raised. There
was already a partial fix for this race in the macb_poll function where
it checked for RSR bits being set and re-triggered NAPI receive.
However, there was a still a race window between checking RSR and
actually enabling interrupts, where a lost wakeup could happen. It's
necessary to check again after enabling interrupts to see if RSR was set
just prior to the interrupt being enabled, and re-trigger receive in that
case.

This issue was noticed in a point-to-point UDP request-response protocol
which periodically saw timeouts or abnormally high response times due to
received packets not being processed in a timely fashion. In many
applications, more packets arriving, including TCP retransmissions, would
cause the original packet to be processed, thus masking the issue.

Fixes: 02f7a34f34 ("net: macb: Re-enable RX interrupt only when RX is done")
Cc: stable@vger.kernel.org
Co-developed-by: Scott McNutt <scott.mcnutt@siriusxm.com>
Signed-off-by: Scott McNutt <scott.mcnutt@siriusxm.com>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-03-04 12:05:54 +00:00
..
appletalk
arcnet net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() 2022-03-03 10:29:13 +00:00
bonding bonding: force carrier update when releasing slave 2022-02-17 10:55:21 -08:00
caif
can can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready 2022-02-25 17:46:54 +01:00
dsa net: dsa: microchip: fix bridging with more than two member ports 2022-02-19 16:22:46 +00:00
ethernet net: macb: Fix lost RX packet wakeup race in NAPI receive 2022-03-04 12:05:54 +00:00
fddi
fjes
hamradio drivers: hamradio: 6pack: fix UAF bug caused by mod_timer() 2022-02-18 10:58:17 +00:00
hippi
hyperv
ieee802154 net: ieee802154: ca8210: Fix lifs/sifs periods 2022-02-02 18:04:50 +01:00
ipa net: ipa: add an interconnect dependency 2022-03-02 22:14:05 -08:00
ipvlan
mctp mctp: serial: Cancel pending work from ndo_uninit handler 2022-02-11 14:39:54 -08:00
mdio net: mdio-ipq4019: add delay after clock enable 2022-02-21 13:04:53 +00:00
netdevsim ipv6: fix data-race in fib6_info_hw_flags_set / fib6_purge_rt 2022-02-17 09:48:24 -08:00
pcs
phy net: phy: mediatek: remove PHY mode check on MT7531 2022-02-15 14:21:01 +00:00
plip
ppp
slip
team
usb sr9700: sanity check for packet length 2022-02-18 11:05:08 +00:00
vmxnet3
wan
wireguard
wireless iwlwifi: mvm: return value for request_ownership 2022-03-02 22:37:25 +01:00
wwan
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-02-24 08:58:37 -08:00
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c net: macsec: Verify that send_sci is on when setting Tx sci explicitly 2022-02-01 20:32:20 -08:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c veth: fix races around rq->rx_notify_masked 2022-02-09 12:04:53 +00:00
virtio_net.c
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen/netfront: destroy queues before real_num_tx_queues is zeroed 2022-02-25 10:27:01 +00:00