Eric Dumazet
90b2be27bb
net/sched: annotate lockless accesses to qdisc->empty
...
KCSAN reported the following race [1]
BUG: KCSAN: data-race in __dev_queue_xmit / net_tx_action
read to 0xffff8880ba403508 of 1 bytes by task 21814 on cpu 1:
__dev_xmit_skb net/core/dev.c:3389 [inline]
__dev_queue_xmit+0x9db/0x1b40 net/core/dev.c:3761
dev_queue_xmit+0x21/0x30 net/core/dev.c:3825
neigh_hh_output include/net/neighbour.h:500 [inline]
neigh_output include/net/neighbour.h:509 [inline]
ip6_finish_output2+0x873/0xec0 net/ipv6/ip6_output.c:116
__ip6_finish_output net/ipv6/ip6_output.c:142 [inline]
__ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127
ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152
NF_HOOK_COND include/linux/netfilter.h:294 [inline]
ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175
dst_output include/net/dst.h:436 [inline]
ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179
ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795
udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173
udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471
inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576
sock_sendmsg_nosec net/socket.c:637 [inline]
sock_sendmsg+0x9f/0xc0 net/socket.c:657
___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311
__sys_sendmmsg+0x123/0x350 net/socket.c:2413
__do_sys_sendmmsg net/socket.c:2442 [inline]
__se_sys_sendmmsg net/socket.c:2439 [inline]
__x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439
do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
write to 0xffff8880ba403508 of 1 bytes by interrupt on cpu 0:
qdisc_run_begin include/net/sch_generic.h:160 [inline]
qdisc_run include/net/pkt_sched.h:120 [inline]
net_tx_action+0x2b1/0x6c0 net/core/dev.c:4551
__do_softirq+0x115/0x33f kernel/softirq.c:292
do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082
do_softirq.part.0+0x6b/0x80 kernel/softirq.c:337
do_softirq kernel/softirq.c:329 [inline]
__local_bh_enable_ip+0x76/0x80 kernel/softirq.c:189
local_bh_enable include/linux/bottom_half.h:32 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:688 [inline]
ip6_finish_output2+0x7bb/0xec0 net/ipv6/ip6_output.c:117
__ip6_finish_output net/ipv6/ip6_output.c:142 [inline]
__ip6_finish_output+0x2d7/0x330 net/ipv6/ip6_output.c:127
ip6_finish_output+0x41/0x160 net/ipv6/ip6_output.c:152
NF_HOOK_COND include/linux/netfilter.h:294 [inline]
ip6_output+0xf2/0x280 net/ipv6/ip6_output.c:175
dst_output include/net/dst.h:436 [inline]
ip6_local_out+0x74/0x90 net/ipv6/output_core.c:179
ip6_send_skb+0x53/0x110 net/ipv6/ip6_output.c:1795
udp_v6_send_skb.isra.0+0x3ec/0xa70 net/ipv6/udp.c:1173
udpv6_sendmsg+0x1906/0x1c20 net/ipv6/udp.c:1471
inet6_sendmsg+0x6d/0x90 net/ipv6/af_inet6.c:576
sock_sendmsg_nosec net/socket.c:637 [inline]
sock_sendmsg+0x9f/0xc0 net/socket.c:657
___sys_sendmsg+0x2b7/0x5d0 net/socket.c:2311
__sys_sendmmsg+0x123/0x350 net/socket.c:2413
__do_sys_sendmmsg net/socket.c:2442 [inline]
__se_sys_sendmmsg net/socket.c:2439 [inline]
__x64_sys_sendmmsg+0x64/0x80 net/socket.c:2439
do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21817 Comm: syz-executor.2 Not tainted 5.4.0-rc6+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Fixes: d518d2ed8640 ("net/sched: fix race between deactivation and dequeue for NOLOCK qdisc")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-08 12:21:55 -08:00
..
2019-07-06 12:50:01 +02:00
2019-09-27 15:10:34 -07:00
2019-06-19 17:09:55 +02:00
2019-10-24 14:53:49 -07:00
2019-09-24 16:37:18 +02:00
2019-11-06 16:14:48 -08:00
2019-11-06 16:14:48 -08:00
2019-11-03 08:30:58 +01:00
2019-11-06 16:14:48 -08:00
2019-10-15 16:24:26 -07:00
2019-07-12 16:03:16 -07:00
2019-11-04 11:15:27 -08:00
2019-11-02 13:54:56 -07:00
2019-09-04 14:22:33 +02:00
2019-09-16 12:06:25 +02:00
2019-11-08 12:21:55 -08:00
2019-05-30 11:29:52 -07:00
2019-11-06 16:14:48 -08:00
2019-11-06 16:14:48 -08:00
2019-07-10 18:43:43 -07:00
2019-11-05 18:09:45 -08:00
2019-11-07 20:07:30 -08:00
2019-07-11 14:37:45 -07:00
2019-11-02 13:54:56 -07:00
2019-09-26 08:56:17 +02:00
2019-11-07 16:17:52 -08:00
2019-11-06 16:14:48 -08:00
2019-07-29 10:26:14 -07:00
2019-09-27 10:27:14 +02:00
2019-07-08 19:48:57 -07:00
2019-10-24 14:53:48 -07:00
2019-06-23 13:24:17 -07:00
2019-06-17 20:20:36 -07:00
2019-11-06 21:35:34 -08:00
2019-11-08 10:19:19 +01:00
2019-05-30 11:26:41 -07:00
2019-08-25 14:34:08 -07:00
2019-09-19 18:04:40 -07:00
2019-11-05 14:03:11 -08:00
2019-09-01 11:45:02 -07:00
2019-10-13 11:20:03 -07:00
2019-10-24 14:53:48 -07:00
2019-11-02 13:54:56 -07:00
2019-06-19 17:09:55 +02:00
2019-11-06 21:25:19 -08:00
2019-10-01 18:42:15 +02:00
2019-10-28 13:33:41 -07:00
2019-09-16 09:18:03 +02:00
2019-10-30 17:58:23 -07:00
2019-10-17 15:23:03 -04:00
2019-06-19 17:09:55 +02:00
2019-11-06 16:14:48 -08:00
2019-11-02 13:54:56 -07:00
2019-11-08 12:21:55 -08:00
2019-11-06 16:14:48 -08:00
2019-11-02 13:54:56 -07:00
2019-06-22 08:59:24 -04:00
2019-10-30 12:04:35 -04:00
2019-05-30 11:26:32 -07:00
2019-11-07 20:08:53 -08:00
2019-10-07 09:58:28 -04:00
2019-11-02 13:54:56 -07:00
2019-11-06 16:14:48 -08:00
2019-08-10 15:25:47 -07:00
2019-11-08 11:36:48 -08:00
2019-11-06 16:14:48 -08:00
2019-11-02 15:29:58 -07:00
2019-10-01 18:42:15 +02:00
2019-05-31 15:30:03 -06:00
2019-08-17 12:40:08 -07:00
2019-07-19 10:42:02 -07:00
2019-05-21 10:50:45 +02:00