]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit64930a6d65465df25cf99427f15090da785493a9
treeb43ade4b580e3ccdd0e1b32757bdcf0731c6159c
parent5f93ce722b0506127badea1af9502b41327e9c5e
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: cfce3383c7be ("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