Eric Dumazet
d636fc5dd6
net: sched: add rcu annotations around qdisc->qdisc_sleeping
syzbot reported a race around qdisc->qdisc_sleeping [1]
It is time we add proper annotations to reads and writes to/from
qdisc->qdisc_sleeping.
[1]
BUG: KCSAN: data-race in dev_graft_qdisc / qdisc_lookup_rcu
read to 0xffff8881286fc618 of 8 bytes by task 6928 on cpu 1:
qdisc_lookup_rcu+0x192/0x2c0 net/sched/sch_api.c:331
__tcf_qdisc_find+0x74/0x3c0 net/sched/cls_api.c:1174
tc_get_tfilter+0x18f/0x990 net/sched/cls_api.c:2547
rtnetlink_rcv_msg+0x7af/0x8c0 net/core/rtnetlink.c:6386
netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6413
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913
sock_sendmsg_nosec net/socket.c:724 [inline]
sock_sendmsg net/socket.c:747 [inline]
____sys_sendmsg+0x375/0x4c0 net/socket.c:2503
___sys_sendmsg net/socket.c:2557 [inline]
__sys_sendmsg+0x1e3/0x270 net/socket.c:2586
__do_sys_sendmsg net/socket.c:2595 [inline]
__se_sys_sendmsg net/socket.c:2593 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2593
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
write to 0xffff8881286fc618 of 8 bytes by task 6912 on cpu 0:
dev_graft_qdisc+0x4f/0x80 net/sched/sch_generic.c:1115
qdisc_graft+0x7d0/0xb60 net/sched/sch_api.c:1103
tc_modify_qdisc+0x712/0xf10 net/sched/sch_api.c:1693
rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6395
netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2546
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6413
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1913
sock_sendmsg_nosec net/socket.c:724 [inline]
sock_sendmsg net/socket.c:747 [inline]
____sys_sendmsg+0x375/0x4c0 net/socket.c:2503
___sys_sendmsg net/socket.c:2557 [inline]
__sys_sendmsg+0x1e3/0x270 net/socket.c:2586
__do_sys_sendmsg net/socket.c:2595 [inline]
__se_sys_sendmsg net/socket.c:2593 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2593
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 6912 Comm: syz-executor.5 Not tainted 6.4.0-rc3-syzkaller-00190-g0d85b27b0cc6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/16/2023
Fixes: 3a7d0d07a3 ("net: sched: extend Qdisc with rcu")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vlad Buslov <vladbu@nvidia.com>
Acked-by: Jamal Hadi Salim<jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-07 10:25:39 +01:00
..
2023-04-29 09:09:31 +02:00
2023-05-19 11:03:36 +01:00
2023-04-27 12:07:50 -07:00
2023-04-26 09:05:00 -04:00
2023-05-03 11:25:01 -07:00
2023-05-24 20:44:18 -07:00
2023-04-26 16:07:23 -07:00
2023-04-19 20:39:03 +02:00
2023-04-22 01:39:40 +02:00
2023-04-21 08:29:13 +01:00
2023-04-27 11:42:11 -07:00
2023-05-08 15:29:12 +02:00
2023-06-01 17:15:33 -04:00
2023-04-26 16:07:23 -07:00
2023-04-12 15:30:36 +05:30
2023-04-21 14:37:03 +01:00
2023-05-17 09:56:01 -07:00
2023-05-13 18:04:59 +09:00
2023-04-27 17:17:12 -07:00
2023-05-08 20:40:46 +01:00
2023-04-17 18:01:22 +02:00
2023-04-26 12:52:58 -07:00
2023-04-26 12:52:58 -07:00
2023-05-20 05:38:01 -06:00
2023-04-22 08:21:05 -07:00
2023-04-15 17:36:50 -07:00
2023-04-21 11:34:50 -07:00
2023-04-16 08:51:24 -07:00
2023-04-21 14:52:01 -07:00
2023-04-14 10:13:39 +01:00
2023-04-18 16:29:49 -07:00
2023-04-29 17:29:39 -07:00
2023-04-13 11:49:35 -07:00
2023-05-17 09:36:46 -07:00
2023-04-28 14:02:54 -07:00
2023-04-27 10:09:05 -07:00
2023-04-25 12:39:01 -07:00
2023-04-17 18:01:23 +02:00
2023-04-20 18:20:04 +08:00
2023-04-18 16:39:34 -07:00
2023-04-14 12:32:20 -04:00
2023-05-09 11:06:45 +02:00
2023-04-13 22:22:10 -07:00
2023-04-18 20:48:59 -07:00
2023-04-26 09:04:59 -04:00
2023-04-13 07:38:54 -06:00
2023-04-13 21:36:41 -07:00
2023-06-01 22:41:14 +09:00
2023-05-29 06:40:33 -04:00
2023-04-26 08:57:41 -07:00
2023-04-11 19:23:15 -07:00
2023-05-05 13:11:02 -07:00
2023-04-18 16:29:51 -07:00
2023-04-27 19:42:02 -07:00
2023-05-03 17:27:29 +02:00
2023-04-13 16:32:02 +02:00
2023-04-21 08:25:49 +01:00
2023-05-19 22:46:37 -07:00
2023-05-10 10:25:55 +01:00
2023-04-15 14:44:57 -06:00
2023-05-09 07:59:54 -06:00
2023-04-21 08:54:47 -07:00
2023-04-30 13:00:38 -07:00
2023-04-18 16:30:09 -07:00
2023-05-02 17:21:50 -07:00
2023-05-01 12:06:20 -07:00
2023-05-02 10:36:02 -07:00
2023-04-27 13:45:31 -07:00
2023-05-02 14:48:14 +02:00
2023-05-28 07:15:33 -04:00
2023-04-24 11:21:50 -07:00
2023-04-18 11:48:55 -05:00
2023-04-18 16:29:50 -07:00
2023-04-18 16:30:11 -07:00
2023-04-28 14:53:30 -07:00
2023-04-28 09:43:49 -07:00
2023-04-18 16:30:11 -07:00
2023-04-13 17:15:50 -07:00
2023-04-27 16:36:55 -07:00
2023-05-24 18:08:49 +02:00
2023-04-24 00:09:20 -05:00
2023-06-07 10:25:39 +01:00
2023-04-21 11:34:14 -07:00
2023-04-11 16:13:21 -04:00
2023-04-28 15:48:45 -04:00
2023-04-26 09:05:00 -04:00
2023-04-13 17:46:35 -05:00
2023-04-27 12:07:50 -07:00
2023-04-13 17:46:34 -05:00
2023-04-27 12:07:50 -07:00
2023-04-27 19:42:02 -07:00
2023-04-27 19:42:02 -07:00
2023-05-08 11:25:19 +02:00
2023-04-18 10:36:58 -07:00
2023-04-30 11:51:51 -07:00
2023-04-20 15:43:34 +02:00
2023-05-17 21:29:09 -07:00
2023-04-21 15:34:33 +02:00
2023-04-20 22:55:35 -04:00
2023-04-20 14:25:07 +02:00
2023-04-20 18:20:05 +08:00
2023-04-13 14:27:53 +02:00
2023-04-18 16:39:33 -07:00
2023-04-13 16:04:28 -07:00
2023-04-28 15:57:53 -07:00
2023-04-21 08:19:30 +01:00
2023-04-24 13:39:58 -07:00
2023-04-19 14:07:13 -06:00
2023-04-18 11:15:24 -07:00
2023-04-25 21:03:14 -04:00
2023-04-23 21:51:25 -07:00
2023-04-18 16:29:55 -07:00
2023-05-17 15:24:33 -07:00
2023-05-19 08:37:37 +01:00
2023-05-23 16:10:11 +02:00
2023-04-27 19:42:02 -07:00
2023-04-28 15:03:43 -07:00
2023-04-14 17:31:23 +02:00
2023-04-13 12:50:46 +02:00
2023-04-20 19:06:12 +02:00
2023-04-21 14:52:02 -07:00
2023-04-29 10:29:57 -07:00
2023-04-16 14:23:07 +02:00
2023-05-02 19:24:16 -07:00
2023-04-27 19:20:12 +02:00
2023-05-16 02:43:12 +03:00
2023-05-23 23:38:23 -04:00
2023-04-27 11:53:57 -07:00
2023-05-02 17:21:50 -07:00
2023-04-27 11:42:11 -07:00
2023-05-23 21:08:33 -04:00
2023-04-27 19:42:02 -07:00
2023-04-21 03:02:35 -04:00
2023-05-02 11:56:43 -07:00
2023-04-21 03:02:35 -04:00
2023-04-21 03:02:30 -04:00
2023-04-21 03:02:34 -04:00
2023-04-24 11:48:33 +02:00
2023-04-17 18:01:22 +02:00