Go to file
liuchun 302fd47008 raw: convert raw sockets to RCU
Upstream commit:0daf07e527095e64ee8927ce297ab626643e9f51
Upstream commit:af185d8c76333daa877678e0166a7b45e63bf3c4

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.

Without this fix, following script triggers soft lockups:

for i in {1..48}
do
 ping -f -n -q 127.0.0.1 &
 sleep 0.1
done

Conflicts: rewrite net/ipv4/raw.c net/ipv4/raw_diag.c net/ipv6/raw.c

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Link: https://lore.kernel.org/r/20220620100509.3493504-1-eric.dumazet@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Chun Liu <kaicliu@tencent.com>
2022-11-03 14:14:19 +08:00
Documentation docs/bpf: Add BPF ring buffer design notes 2022-08-30 11:33:29 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch dist: tk4: fix debugedit compact issue 2022-10-17 17:31:28 +08:00
block Add sysfs attribute to hide disk devices 2022-07-25 16:24:47 +08:00
certs certs: Fix blacklist flag type confusion 2021-04-12 12:52:25 +08:00
crypto crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS 2021-05-20 16:07:34 +08:00
dist dist: fix remote name in check-commits 2022-10-18 11:37:20 +08:00
drivers virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2022-10-18 10:47:43 +08:00
fs bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t 2022-08-30 11:33:28 +08:00
include raw: convert raw sockets to RCU 2022-11-03 14:14:19 +08:00
init bpf: Introduce BPF_PROG_TYPE_LSM 2022-08-30 11:33:21 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel sli: fix the compiling error caused by memory access out of range 2022-10-14 16:20:22 +08:00
lib bug: Remove redundant condition check in report_bug 2021-05-20 16:07:55 +08:00
mm Revert "mm/lru: introduce TestClearPageLRU" 2022-09-05 20:56:40 +08:00
net raw: convert raw sockets to RCU 2022-11-03 14:14:19 +08:00
package configs: set EDD, RAID, CRAMFS as modules 2022-10-25 15:15:58 +08:00
samples kfifo: fix ternary sign extension bugs 2021-05-20 16:08:01 +08:00
scripts bpf: fix selftest case compile error for bpf_timer 2022-08-30 11:33:34 +08:00
security bpf: Implement bpf_local_storage for inodes 2022-08-30 11:33:29 +08:00
sound ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails 2021-05-20 16:07:59 +08:00
tools bpf, selftests: Add redirect_peer selftest 2022-08-30 11:33:35 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: Stop looking for coalesced MMIO zones if the bus is destroyed 2021-05-20 16:07:44 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes dist: hook into kernel build system 2022-10-17 02:25:35 +08:00
.gitignore dist: hook into kernel build system 2022-10-17 02:25:35 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS bpf: Introduce BPF_PROG_TYPE_LSM 2022-08-30 11:33:21 +08:00
Makefile dist: hook into kernel build system 2022-10-17 02:25:35 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0