android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
John Fastabend dbd10d4b47
UPSTREAM: bpf, xdp: Remove no longer required rcu_read_{un}lock()
Now that we depend on rcu_call() and synchronize_rcu() to also wait
for preempt_disabled region to complete the rcu read critical section
in __dev_map_flush() is no longer required. Except in a few special
cases in drivers that need it for other reasons.

These originally ensured the map reference was safe while a map was
also being free'd. And additionally that bpf program updates via
ndo_bpf did not happen while flush updates were in flight. But flush
by new rules can only be called from preempt-disabled NAPI context.
The synchronize_rcu from the map free path and the rcu_call from the
delete path will ensure the reference there is safe. So lets remove
the rcu_read_lock and rcu_read_unlock pair to avoid any confusion
around how this is being protected.

If the rcu_read_lock was required it would mean errors in the above
logic and the original patch would also be wrong.

Now that we have done above we put the rcu_read_lock in the driver
code where it is needed in a driver dependent way. I think this
helps readability of the code so we know where and why we are
taking read locks. Most drivers will not need rcu_read_locks here
and further XDP drivers already have rcu_read_locks in their code
paths for reading xdp programs on RX side so this makes it symmetric
where we don't have half of rcu critical sections define in driver
and the other half in devmap.

Change-Id: Id759e81634f3f69fc8684333067637decca01459
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Link: https://lore.kernel.org/bpf/1580084042-11598-4-git-send-email-john.fastabend@gmail.com
2025-12-23 13:35:55 -08:00
..
appletalk
arcnet arcnet: Add NULL check in com20020pci_probe() 2025-04-10 14:29:43 +02:00
bonding net: bonding: fix possible peer notify event loss or dup issue 2025-10-29 13:59:59 +01:00
caif This is the 5.4.291 stable release 2025-03-13 14:53:52 +00:00
can Merge branch 'android11-5.4-lts' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-12-11 01:41:51 -08:00
dsa net: dsa: b53: stop reading ARL entries if search is done 2025-12-03 12:45:15 +01:00
ethernet UPSTREAM: bpf: Convert bpf_prog refcnt to atomic64_t 2025-12-23 13:35:42 -08:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event 2024-11-08 16:20:51 +01:00
ieee802154 ieee802154: ca8210: Use proper setters and getters for bitwise types 2025-06-04 14:32:31 +02:00
ipvlan
netdevsim
phy Merge branch 'android11-5.4-lts' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-12-11 01:41:51 -08:00
plip
ppp ppp: fix memory leak in pad_compress_skb 2025-09-09 18:43:58 +02:00
slip slip: make slhc_remember() more robust against malicious packets 2024-11-08 16:20:46 +01:00
team team: better TEAM_OPTION_TYPE_STRING validation 2025-03-13 12:43:12 +01:00
usb fixup! net: usb: rtl8150: Fix frame padding 2025-12-11 02:36:44 -08:00
vmxnet3 vmxnet3: update MTU after device quiesce 2025-09-09 18:44:01 +02:00
wan
wimax
wireguard UPSTREAM: wireguard: send: annotate intentional data race in checking empty queue 2025-09-24 12:16:42 +02:00
wireless Merge branch 'android11-5.4-lts' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-12-11 01:41:51 -08:00
xen-netback net/xen-netback: prevent UAF in xenvif_flush_hash() 2025-02-01 18:18:53 +01:00
dummy.c
eql.c
geneve.c This is the 5.4.291 stable release 2025-03-13 14:53:52 +00:00
gtp.c gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl(). 2025-03-13 12:43:22 +01:00
ifb.c
Kconfig UPSTREAM: crypto: mips/poly1305 - enable for all MIPS processors 2025-09-24 12:16:39 +02:00
LICENSE.SRC
loopback.c net: loopback: Avoid sending IP packets without an Ethernet header 2025-03-13 12:43:24 +01:00
macsec.c macsec: don't increment counters for an unrelated SA 2024-11-08 16:20:49 +01:00
macvlan.c
macvtap.c
Makefile UPSTREAM: net: WireGuard secure network tunnel 2025-09-24 12:16:34 +02:00
mdio.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 UPSTREAM: xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths 2025-12-23 13:35:53 -08:00
veth.c UPSTREAM: bpf, xdp: Remove no longer required rcu_read_{un}lock() 2025-12-23 13:35:55 -08:00
virtio_net.c UPSTREAM: xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths 2025-12-23 13:35:53 -08:00
vrf.c vrf: Drop existing dst reference in vrf_ip6_input_dst 2025-08-28 16:21:20 +02:00
vsockmon.c
vxlan.c vxlan: Do not treat dst cache initialization errors as fatal 2025-06-27 11:02:55 +01:00
xen-netfront.c xen/netfront: fix crash when removing device 2024-12-19 18:05:05 +01:00