OSDN Git Service

Merge branch 'raw-ping-fix-locking-in-proc-net-raw-icmp'
authorJakub Kicinski <kuba@kernel.org>
Wed, 5 Apr 2023 01:56:59 +0000 (18:56 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Apr 2023 01:56:59 +0000 (18:56 -0700)
Kuniyuki Iwashima says:

====================
raw/ping: Fix locking in /proc/net/{raw,icmp}.

The first patch fixes a NULL deref for /proc/net/raw and second one fixes
the same issue for ping sockets.

The first patch also converts hlist_nulls to hlist, but this is because
the current code uses sk_nulls_for_each() for lockless readers, instead
of sk_nulls_for_each_rcu() which adds memory barrier, but raw sockets
does not use the nulls marker nor SLAB_TYPESAFE_BY_RCU in the first place.

OTOH, the ping sockets already uses sk_nulls_for_each_rcu(), and such
conversion can be posted later for net-next.
====================

Link: https://lore.kernel.org/r/20230403194959.48928-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge