aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netconsole.c
diff options
context:
space:
mode:
authorBreno Leitao <[email protected]>2024-12-03 00:22:05 +0000
committerJakub Kicinski <[email protected]>2024-12-05 02:41:37 +0000
commita9ab02ed97c654a9ea09afb3e6294cea3768c388 (patch)
tree33e3a623ee029eb2eb5db74cdda20db004c65d84 /drivers/net/netconsole.c
parentr8169: remove support for chip version 11 (diff)
downloadkernel-a9ab02ed97c654a9ea09afb3e6294cea3768c388.tar.gz
kernel-a9ab02ed97c654a9ea09afb3e6294cea3768c388.zip
netpoll: Use rtnl_dereference() for npinfo pointer access
In the __netpoll_setup() function, when accessing the device's npinfo pointer, replace rcu_access_pointer() with rtnl_dereference(). This change is more appropriate, as suggested by Herbert Xu[1]. The function is called with the RTNL mutex held, and the pointer is being dereferenced later, so, dereference earlier and just reuse the pointer for the if/else. The replacement ensures correct pointer access while maintaining the existing locking and RCU semantics of the netpoll subsystem. Link: https://lore.kernel.org/lkml/[email protected]/ [1] Suggested-by: Herbert Xu <[email protected]> Signed-off-by: Breno Leitao <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Acked-by: Herbert Xu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/netconsole.c')
0 files changed, 0 insertions, 0 deletions