Files
kernel_nothing_sm7325/include/linux
Breno Leitao 85cf038c39 netpoll: Use rcu_access_pointer() in netpoll_poll_lock
[ Upstream commit a57d5a72f8dec7db8a79d0016fb0a3bdecc82b56 ]

The ndev->npinfo pointer in netpoll_poll_lock() is RCU-protected but is
being accessed directly for a NULL check. While no RCU read lock is held
in this context, we should still use proper RCU primitives for
consistency and correctness.

Replace the direct NULL check with rcu_access_pointer(), which is the
appropriate primitive when only checking for NULL without dereferencing
the pointer. This function provides the necessary ordering guarantees
without requiring RCU read-side protection.

Fixes: bea3348eef ("[NET]: Make NAPI polling independent of struct net_device objects.")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://patch.msgid.link/20241118-netpoll_rcu-v1-2-a1888dcb4a02@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 19:44:28 +01:00
..
2019-09-17 10:27:46 -07:00
2020-02-19 19:53:09 +01:00
2022-10-26 13:22:39 +02:00
2019-08-28 21:17:12 -06:00
2024-07-05 09:08:31 +02:00
2023-08-08 19:56:33 +02:00
2023-12-20 15:41:18 +01:00
2020-03-25 08:25:58 +01:00
2019-09-05 11:40:54 +02:00
2019-10-02 06:36:50 -07:00
2023-10-25 11:53:22 +02:00
2022-10-26 13:22:46 +02:00
2022-04-15 14:18:32 +02:00
2019-12-13 08:42:53 +01:00
2021-03-04 10:26:29 +01:00
2022-08-25 11:18:04 +02:00
2021-02-07 15:35:49 +01:00
2022-10-07 09:16:54 +02:00
2019-12-13 08:43:18 +01:00
2024-11-17 14:58:53 +01:00
2023-09-23 10:59:40 +02:00
2023-11-20 10:30:10 +01:00
2023-06-21 15:44:10 +02:00
2020-03-18 07:17:46 +01:00
2023-11-28 16:50:16 +00:00
2023-10-25 11:53:18 +02:00
2023-10-25 11:53:18 +02:00
2020-04-02 15:11:00 +02:00
2021-03-07 12:20:49 +01:00
2024-07-05 09:08:31 +02:00
2024-02-23 08:24:47 +01:00
2020-04-02 15:11:00 +02:00
2021-06-10 13:37:14 +02:00