]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge branch 'inet_diag-remove-three-mutexes-in-diag-dumps'
authorPaolo Abeni <pabeni@redhat.com>
Tue, 23 Jan 2024 14:18:42 +0000 (15:18 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Jan 2024 14:18:43 +0000 (15:18 +0100)
Eric Dumazet says:

====================
inet_diag: remove three mutexes in diag dumps

Surprisingly, inet_diag operations are serialized over a stack
of three mutexes, giving legacy /proc based files an unfair
advantage on modern hosts.

This series removes all of them, making inet_diag operations
(eg iproute2/ss) fully parallel.

1-2) Two first patches are adding data-race annotations
     and can be backported to stable kernels.

3-4) inet_diag_table_mutex can be replaced with RCU protection,
     if we add corresponding protection against module unload.

5-7) sock_diag_table_mutex can be replaced with RCU protection,
     if we add corresponding protection against module unload.

 8)  sock_diag_mutex is removed, as the old bug it was
     working around has been fixed more elegantly.

 9)  inet_diag_dump_icsk() can skip over empty buckets to reduce
     spinlock contention.
====================

Link: https://lore.kernel.org/r/20240122112603.3270097-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Trivial merge