sock_diag: allow concurrent operations
authorEric Dumazet <edumazet@google.com>
Mon, 22 Jan 2024 11:26:00 +0000 (11:26 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Jan 2024 14:13:55 +0000 (15:13 +0100)
commit1d55a6974756cf3979efd2cc68bcece611a44053
treed96f21c57f958c7c86e3f96dc9150e1fbe3b2f63
parent114b4bb1cc19239b272d52ebbe156053483fe2f8
sock_diag: allow concurrent operations

sock_diag_broadcast_destroy_work() and __sock_diag_cmd()
are currently using sock_diag_table_mutex to protect
against concurrent sock_diag_handlers[] changes.

This makes inet_diag dump serialized, thus less scalable
than legacy /proc files.

It is time to switch to full RCU protection.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/sock_diag.c