diff options
author | 2022-08-25 10:19:40 +0200 | |
---|---|---|
committer | 2022-08-26 18:47:21 -0700 | |
commit | 8f1948bdcf2fb50e9092c0950c3c9ac591382101 (patch) | |
tree | c1226196268ab3fef0332a460132f84e31186594 /kernel/taskstats.c | |
parent | net/mlx4: Fix error check for dma_map_sg (diff) | |
download | wireguard-linux-8f1948bdcf2fb50e9092c0950c3c9ac591382101.tar.xz wireguard-linux-8f1948bdcf2fb50e9092c0950c3c9ac591382101.zip |
genetlink: hold read cb_lock during iteration of genl_fam_idr in genl_bind()
In genl_bind(), currently genl_lock and write cb_lock are taken
for iteration of genl_fam_idr and processing of static values
stored in struct genl_family. Take just read cb_lock for this task
as it is sufficient to guard the idr and the struct against
concurrent genl_register/unregister_family() calls.
This will allow to run genl command processing in genl_rcv() and
mnl_socket_setsockopt(.., NETLINK_ADD_MEMBERSHIP, ..) in parallel.
Reported-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20220825081940.1283335-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'kernel/taskstats.c')
0 files changed, 0 insertions, 0 deletions