Leon Romanovsky
d086a1c65a
net: sched: Fix suspicious RCU usage while accessing tcf_tunnel_info
...
The access of tcf_tunnel_info() produces the following splat, so fix it
by dereferencing the tcf_tunnel_key_params pointer with marker that
internal tcfa_liock is held.
=============================
WARNING: suspicious RCU usage
5.9.0+ #1 Not tainted
-----------------------------
include/net/tc_act/tc_tunnel_key.h:59 suspicious rcu_dereference_protected() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
1 lock held by tc/34839:
#0 : ffff88828572c2a0 (&p->tcfa_lock){+...}-{2:2}, at: tc_setup_flow_action+0xb3/0x48b5
stack backtrace:
CPU: 1 PID: 34839 Comm: tc Not tainted 5.9.0+ #1
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
Call Trace:
dump_stack+0x9a/0xd0
tc_setup_flow_action+0x14cb/0x48b5
fl_hw_replace_filter+0x347/0x690 [cls_flower]
fl_change+0x2bad/0x4875 [cls_flower]
tc_new_tfilter+0xf6f/0x1ba0
rtnetlink_rcv_msg+0x5f2/0x870
netlink_rcv_skb+0x124/0x350
netlink_unicast+0x433/0x700
netlink_sendmsg+0x6f1/0xbd0
sock_sendmsg+0xb0/0xe0
____sys_sendmsg+0x4fa/0x6d0
___sys_sendmsg+0x12e/0x1b0
__sys_sendmsg+0xa4/0x120
do_syscall_64+0x2d/0x40
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f1f8cd4fe57
Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
RSP: 002b:00007ffdc1e193b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1f8cd4fe57
RDX: 0000000000000000 RSI: 00007ffdc1e19420 RDI: 0000000000000003
RBP: 000000005f85aafa R08: 0000000000000001 R09: 00007ffdc1e1936c
R10: 000000000040522d R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007ffdc1e1d6f0 R15: 0000000000482420
Fixes: 3ebaf6da0716 ("net: sched: Do not assume RTNL is held in tunnel key action helpers")
Fixes: 7a47281439ba ("net: sched: lock action when translating it to flow_action infra")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-10-15 09:10:11 -07:00
..
2020-07-15 20:34:11 -07:00
2020-07-30 11:14:05 +02:00
2020-07-15 20:34:11 -07:00
2020-05-19 12:50:14 -07:00
2020-10-14 01:25:14 +02:00
2020-09-08 13:02:44 +02:00
2020-02-27 12:06:20 -08:00
2019-06-05 17:37:07 +02:00
2020-09-20 14:15:12 -07:00
2020-10-15 09:10:11 -07:00
2020-02-28 14:51:30 +01:00
2020-09-24 19:46:21 -07:00
2020-08-18 15:58:53 -07:00
2019-05-30 11:26:41 -07:00
2020-08-20 18:21:28 +01:00
2020-02-28 12:12:53 -08:00
2019-12-11 15:01:23 -08:00
2019-11-06 16:14:48 -08:00
2019-01-23 11:18:00 -08:00
2019-06-19 17:09:55 +02:00
2020-07-21 18:30:47 -07:00
2019-05-24 17:37:53 +02:00
2020-05-01 12:15:37 -07:00
2019-07-04 12:30:48 -07:00
2020-07-01 15:53:32 -07:00
2020-02-27 18:50:19 -08:00
2020-06-20 17:30:59 -07:00
2019-05-21 11:28:45 +02:00
2019-06-19 17:09:55 +02:00
2020-07-31 09:27:02 +02:00
2020-02-29 14:39:08 +01:00
2020-05-29 16:11:50 -04:00
2020-07-15 07:45:24 -07:00
2020-03-27 19:40:38 -07:00
2020-07-19 18:16:40 -07:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:29:52 -07:00
2020-08-03 18:06:46 -07:00
2020-02-29 21:52:20 -08:00
2019-05-21 11:52:39 +02:00
2019-05-21 11:52:39 +02:00
2020-03-31 17:29:33 -07:00
2020-07-23 15:14:58 -07:00
2019-12-16 16:09:44 -08:00
2020-05-08 21:33:33 -07:00
2020-08-04 13:01:45 -07:00
2020-05-05 13:23:29 -07:00
2020-02-19 13:52:32 +01:00
2020-04-20 07:34:16 +02:00
2019-06-19 17:09:55 +02:00
2019-12-24 22:37:30 -08:00
2020-07-28 17:42:31 -07:00
2020-07-24 15:23:31 -07:00
2020-08-05 20:13:21 -07:00
2020-09-14 14:54:56 -07:00
2020-07-31 09:24:24 +02:00
2020-07-31 09:24:24 +02:00
2019-12-09 10:36:44 -08:00
2019-11-05 18:20:55 -08:00
2020-09-28 18:51:50 -07:00
2019-03-22 12:09:31 -07:00
2018-12-10 15:53:04 -08:00
2020-06-22 21:12:44 -07:00
2019-10-25 16:24:32 -07:00
2020-02-13 14:19:00 -08:00
2020-07-31 09:27:00 +02:00
2019-05-30 11:26:41 -07:00
2020-05-11 13:18:54 -07:00
2019-04-22 21:50:53 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-03-30 13:45:04 -07:00
2020-05-09 00:48:20 +02:00
2020-08-11 15:49:08 -07:00
2020-07-03 14:34:53 -07:00
2019-08-08 15:55:10 -07:00
2020-06-09 13:26:23 -07:00
2020-07-19 19:20:22 -07:00
2019-09-27 12:05:02 +02:00
2019-02-08 21:50:15 -08:00
2020-06-20 17:47:53 -07:00
2020-07-15 20:34:11 -07:00
2020-05-18 17:35:02 -07:00
2019-06-18 20:48:45 -04:00
2020-05-26 16:06:07 -07:00
2020-08-04 13:01:45 -07:00
2020-07-22 01:17:59 +02:00
2020-09-24 19:51:16 -07:00
2019-06-19 11:37:47 -04:00
2020-05-29 13:02:33 -07:00
2020-07-24 15:41:54 -07:00
2020-02-05 14:28:09 +01:00
2019-06-19 17:09:55 +02:00
2020-06-20 17:22:22 -07:00
2019-10-08 13:23:05 -07:00
2020-03-29 22:30:57 -07:00
2020-07-31 09:27:01 +02:00
2019-05-30 11:26:41 -07:00
2020-03-26 20:17:36 -07:00
2020-03-02 11:16:27 -08:00
2020-02-29 21:52:20 -08:00
2020-02-28 12:08:37 -08:00
2020-05-29 21:20:20 -07:00
2020-07-31 16:55:32 -07:00
2019-12-09 10:36:44 -08:00
2020-08-24 06:40:07 -07:00
2020-06-08 10:13:56 -04:00
2020-06-01 15:21:02 -07:00
2019-05-21 11:28:45 +02:00
2020-10-02 13:00:38 -07:00
2019-11-12 08:18:03 -08:00
2019-04-11 13:59:49 -07:00
2020-06-10 13:20:20 -07:00
2020-02-20 10:09:25 -08:00
2020-03-04 13:25:55 -08:00
2019-05-30 11:26:32 -07:00
2020-07-16 16:48:34 -07:00
2020-07-03 14:34:53 -07:00
2019-05-30 11:26:32 -07:00
2019-09-16 09:18:03 +02:00
2019-05-30 11:26:32 -07:00
2020-03-14 21:03:46 -07:00
2020-07-31 09:24:23 +02:00
2020-07-31 16:55:32 -07:00
2020-03-23 21:57:44 -07:00
2020-06-23 20:27:09 -07:00
2018-11-06 15:00:45 -08:00
2019-04-22 21:47:25 -07:00
2020-08-03 15:04:48 -07:00
2020-07-13 11:03:44 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-06-04 15:39:32 -07:00
2019-11-15 12:28:28 -08:00
2019-10-05 16:29:00 -07:00
2020-02-29 21:52:19 -08:00
2020-08-06 19:44:25 -07:00
2019-06-19 17:09:55 +02:00
2020-07-14 13:46:42 -07:00
2019-05-30 11:26:32 -07:00
2020-08-10 12:12:35 -07:00
2019-05-30 11:26:32 -07:00
2019-10-04 14:07:07 -07:00
2020-10-09 16:49:57 -07:00
2020-06-23 20:10:15 -07:00
2020-06-18 20:46:23 -07:00
2020-08-03 10:13:54 -07:00
2020-07-24 15:41:54 -07:00
2019-11-14 18:12:17 -08:00
2020-09-14 16:49:39 -07:00
2020-07-15 20:34:02 -07:00
2019-12-09 10:28:43 -08:00
2019-11-16 12:39:10 -08:00
2020-05-21 17:31:27 -07:00
2020-07-13 15:32:56 -07:00
2020-07-25 20:37:02 -07:00
2020-09-07 12:45:22 +02:00
2020-06-30 15:44:03 +02:00