1
linux/net/devlink
Jiri Pirko c503bc7df6 devlink: call peernet2id_alloc() with net pointer under RCU read lock
peernet2id_alloc() allows to be called lockless with peer net pointer
obtained in RCU critical section and makes sure to return ns ID if net
namespaces is not being removed concurrently. Benefit from
read_pnet_rcu() helper addition, use it to obtain net pointer under RCU
read lock and pass it to peernet2id_alloc() to get ns ID.

Fixes: c137743bce ("devlink: introduce object and nested devlink relationship infra")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-18 09:23:01 +01:00
..
core.c devlink: introduce possibility to expose info about nested devlinks 2023-09-17 14:01:47 +01:00
dev.c devlink: introduce possibility to expose info about nested devlinks 2023-09-17 14:01:47 +01:00
devl_internal.h devlink: introduce possibility to expose info about nested devlinks 2023-09-17 14:01:47 +01:00
dpipe.c devlink: push dpipe related code into separate file 2023-08-28 08:02:22 -07:00
health.c devlink: Hold devlink lock on health reporter dump get 2023-10-06 15:56:46 -07:00
linecard.c devlink: convert linecard nested devlink to new rel infrastructure 2023-09-17 14:01:47 +01:00
Makefile devlink: move devlink_notify_register/unregister() to dev.c 2023-08-28 08:02:24 -07:00
netlink_gen.c netlink: specs: devlink: extend health reporter dump attributes by port index 2023-08-14 11:47:25 -07:00
netlink_gen.h
netlink.c devlink: call peernet2id_alloc() with net pointer under RCU read lock 2023-10-18 09:23:01 +01:00
param.c devlink: push param related code into separate file 2023-08-28 08:02:22 -07:00
port.c devlink: expose peer SF devlink instance 2023-09-17 14:01:47 +01:00
rate.c devlink: push rate related code into separate file 2023-08-28 08:02:23 -07:00
region.c devlink: push region related code into separate file 2023-08-28 08:02:23 -07:00
resource.c devlink: push resource related code into separate file 2023-08-28 08:02:22 -07:00
sb.c devlink: push shared buffer related code into separate file 2023-08-28 08:02:22 -07:00
trap.c devlink: push trap related code into separate file 2023-08-28 08:02:23 -07:00