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)
commit95fac54004a8aebddad74e9984c1c9785190668c
treec2c86b24663336c6bb546d9fb3cbef8ef6d32c67
parent218c597325f4faf7b7a6049233a30d7842b5b2dc
parentab5fb73ffa01072b4d8031cc05801fa1cb653bee
Merge branch 'raw-ping-fix-locking-in-proc-net-raw-icmp'

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>