1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/freescale
Toke Høiland-Jørgensen 547aabcac3 freescale: Remove rcu_read_lock() around XDP program invocation
The dpaa and dpaa2 drivers have rcu_read_lock()/rcu_read_unlock() pairs
around XDP program invocations. However, the actual lifetime of the objects
referred by the XDP program invocation is longer, all the way through to
the call to xdp_do_flush(), making the scope of the rcu_read_lock() too
small. This turns out to be harmless because it all happens in a single
NAPI poll cycle (and thus under local_bh_disable()), but it makes the
rcu_read_lock() misleading.

Rather than extend the scope of the rcu_read_lock(), just get rid of it
entirely. With the addition of RCU annotations to the XDP_REDIRECT map
types that take bh execution into account, lockdep even understands this to
be safe, so there's really no reason to keep it around.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Cc: Madalin Bucur <madalin.bucur@nxp.com>
Cc: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/bpf/20210624160609.292325-11-toke@redhat.com
2021-06-24 19:44:17 +02:00
..
dpaa freescale: Remove rcu_read_lock() around XDP program invocation 2021-06-24 19:44:17 +02:00
dpaa2 freescale: Remove rcu_read_lock() around XDP program invocation 2021-06-24 19:44:17 +02:00
enetc net: enetc: Use devm_platform_get_and_ioremap_resource() 2021-06-07 14:07:22 -07:00
fman of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
fs_enet of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
fec.h net: fec: Fix temporary RMII clock reset on link up 2021-01-26 18:24:39 -08:00
fec_main.c net: fec: add defer probe for of_get_mac_address 2021-05-12 14:01:50 -07:00
fec_mpc52xx.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
fec_mpc52xx.h
fec_mpc52xx_phy.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
fec_ptp.c net: fec: ptp: avoid register access when ipg clock is disabled 2021-02-26 15:45:18 -08:00
fsl_pq_mdio.c net: freescale: convert comma to semicolon 2020-12-09 16:23:08 -08:00
gianfar.c net: gianfar: Implement rx_missed_errors counter 2021-06-17 11:39:48 -07:00
gianfar.h net: gianfar: Implement rx_missed_errors counter 2021-06-17 11:39:48 -07:00
gianfar_ethtool.c net: gianfar: reject unsupported coalescing params 2020-03-12 11:32:35 -07:00
Kconfig net: selftest: fix build issue if INET is disabled 2021-04-28 14:06:45 -07:00
Makefile net: enetc: fix link error again 2021-04-22 13:23:07 -07:00
ucc_geth.c ethernet: ucc_geth: Use kmemdup() rather than kmalloc+memcpy 2021-05-23 18:51:42 -07:00
ucc_geth.h ethernet: ucc_geth: simplify rx/tx allocations 2021-01-21 12:19:56 -08:00
ucc_geth_ethtool.c net/freescale: Don't set zero if FW not-available in ucc_geth 2020-03-03 17:54:55 -08:00
xgmac_mdio.c net/fsl: Use [acpi|of]_mdiobus_register 2021-06-11 13:08:53 -07:00