ping: convert to RCU lookups, get rid of rwlock
authorEric Dumazet <edumazet@google.com>
Sat, 18 Jun 2022 04:04:15 +0000 (21:04 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jun 2022 09:54:29 +0000 (10:54 +0100)
commitdbca1596bbb08318f5e3b3b99f8ca0a0d3830a65
treeb43ade4b580e3ccdd0e1b32757bdcf0731c6159c
parentf0623340fd2cab724e3c54ac026d1414325f375d
ping: convert to RCU lookups, get rid of rwlock

Using rwlock in networking code is extremely risky.
writers can starve if enough readers are constantly
grabing the rwlock.

I thought rwlock were at fault and sent this patch:

https://lkml.org/lkml/2022/6/17/272

But Peter and Linus essentially told me rwlock had to be unfair.

We need to get rid of rwlock in networking code.

Fixes: c319b4d76b9e ("net: ipv4: add IPPROTO_ICMP socket kind")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ping.c