Eric Dumazet
8c9df6ced1
tipc: block BH before using dst_cache
...
[ Upstream commit 1378817486d6860f6a927f573491afe65287abf1 ]
dst_cache_get() documents it must be used with BH disabled.
sysbot reported :
BUG: using smp_processor_id() in preemptible [00000000] code: /21697
caller is dst_cache_get+0x3a/0xb0 net/core/dst_cache.c:68
CPU: 0 PID: 21697 Comm: Not tainted 5.7.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x188/0x20d lib/dump_stack.c:118
check_preemption_disabled lib/smp_processor_id.c:47 [inline]
debug_smp_processor_id.cold+0x88/0x9b lib/smp_processor_id.c:57
dst_cache_get+0x3a/0xb0 net/core/dst_cache.c:68
tipc_udp_xmit.isra.0+0xb9/0xad0 net/tipc/udp_media.c:164
tipc_udp_send_msg+0x3e6/0x490 net/tipc/udp_media.c:244
tipc_bearer_xmit_skb+0x1de/0x3f0 net/tipc/bearer.c:526
tipc_enable_bearer+0xb2f/0xd60 net/tipc/bearer.c:331
__tipc_nl_bearer_enable+0x2bf/0x390 net/tipc/bearer.c:995
tipc_nl_bearer_enable+0x1e/0x30 net/tipc/bearer.c:1003
genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:718 [inline]
genl_rcv_msg+0x627/0xdf0 net/netlink/genetlink.c:735
netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469
genl_rcv+0x24/0x40 net/netlink/genetlink.c:746
netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
sock_sendmsg_nosec net/socket.c:652 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:672
____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362
___sys_sendmsg+0x100/0x170 net/socket.c:2416
__sys_sendmsg+0xec/0x1b0 net/socket.c:2449
do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45ca29
Fixes: e9c1a793210f ("tipc: add dst_cache support for udp media")
Cc: Xin Long <lucien.xin@gmail.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-03 08:21:03 +02: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
2020-01-12 12:21:50 +01:00
2019-09-24 16:37:18 +02:00
2019-11-18 17:08:20 -08:00
2020-06-03 08:20:39 +02:00
2020-05-14 07:58:28 +02:00
2020-04-13 10:48:13 +02:00
2019-07-25 18:00:41 -07:00
2020-04-21 09:04:53 +02:00
2020-01-04 19:18:58 +01:00
2019-10-28 13:33:41 -07:00
2019-12-31 16:45:56 +01:00
2020-04-02 15:11:02 +02:00
2020-06-03 08:20:47 +02:00
2019-05-30 11:29:52 -07:00
2019-12-18 16:08:40 +01:00
2020-01-04 19:18:58 +01:00
2020-04-23 10:36:45 +02:00
2020-06-03 08:20:43 +02:00
2020-01-09 10:20:06 +01:00
2020-04-21 09:04:44 +02:00
2020-03-18 07:17:44 +01:00
2019-09-26 08:56:17 +02:00
2020-06-03 08:21:01 +02:00
2020-06-03 08:20:41 +02: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
2020-04-21 09:04:44 +02:00
2019-06-23 13:24:17 -07:00
2019-06-17 20:20:36 -07:00
2020-01-12 12:21:45 +01:00
2020-05-10 10:31:32 +02:00
2019-05-30 11:26:41 -07:00
2019-12-18 16:08:42 +01:00
2019-09-19 18:04:40 -07:00
2020-05-20 08:20:25 +02:00
2020-05-20 08:20:08 +02:00
2020-03-18 07:17:40 +01:00
2020-04-29 16:33:08 +02:00
2020-03-18 07:17:46 +01:00
2019-06-19 17:09:55 +02:00
2020-04-29 16:33:08 +02:00
2020-04-01 11:01:35 +02:00
2019-10-28 13:33:41 -07:00
2019-12-04 22:30:54 +01:00
2020-06-03 08:21:00 +02:00
2020-05-20 08:20:27 +02:00
2020-01-12 12:21:33 +01:00
2019-10-24 14:53:48 -07:00
2020-05-27 17:46:51 +02:00
2020-05-20 08:20:07 +02:00
2020-06-03 08:21:02 +02:00
2020-03-18 07:17:59 +01:00
2019-06-22 08:59:24 -04:00
2020-05-20 08:20:39 +02:00
2019-05-30 11:26:32 -07:00
2020-06-03 08:21:03 +02:00
2020-06-03 08:21:01 +02:00
2020-01-17 19:48:52 +01:00
2020-02-14 16:34:07 -05:00
2019-08-10 15:25:47 -07:00
2020-04-21 09:04:59 +02:00
2020-04-29 16:33:09 +02:00
2020-04-23 10:36:21 +02:00
2020-04-01 11:02:07 +02:00
2019-05-31 15:30:03 -06:00
2020-04-01 11:02:18 +02:00
2020-01-17 19:48:52 +01:00