]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: treat possible_net_t net pointer as an RCU one and add read_pnet_rcu()
authorJiri Pirko <jiri@nvidia.com>
Fri, 13 Oct 2023 12:10:23 +0000 (14:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Oct 2023 08:23:01 +0000 (09:23 +0100)
commit2034d90ae41ae93e30d492ebcf1f06f97a9cfba6
tree8c16b208150b60347b4c6116d286726523245bc5
parentee2a35fedbc942e6eeb9e351a53acb1fe6b101c5
net: treat possible_net_t net pointer as an RCU one and add read_pnet_rcu()

Make the net pointer stored in possible_net_t structure annotated as
an RCU pointer. Change the access helpers to treat it as such.
Introduce read_pnet_rcu() helper to allow caller to dereference
the net pointer under RCU read lock.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/net_namespace.h