diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2026-07-03 00:09:20 +0000 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-07-11 12:57:50 +0200 |
| commit | a278ea7ba32a948c90da54caef9193b54652540d (patch) | |
| tree | 6e66f8ce8e6578374f2e4741dacd526d316b370a /include/linux/timerqueue_types.h | |
| parent | d7fda2c776b2a969b9d78c5ad00e30824df43add (diff) | |
bareudp: Protect bareudp_list with mutex.
struct bareudp_dev.net is the netns where the backend bareudp
socket resides.
struct bareudp_dev is linked to the bareudp_net.bareudp_list of
the socket's netns.
During netns dismantle or module unload, bareudp_exit_rtnl_net()
iterates the list and queues devices for destruction regardless
of the devices' netns.
Thus, once RTNL is removed, the list can be modified concurrently
from different netns due to device removal.
Let's protect it with per-netns mutex.
bareudp_newlink() is still protected by rtnl_net_lock()s, so
acquiring bn->lock twice in bareudp_find_dev() and
bareudp_configure() is not a problem.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260703001009.1572444-10-kuniyu@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
