Vlad Buslov
67cbf7dedd
net: sched: sample: allow accessing psample_group with rtnl
...
Recently implemented support for sample action in flow_offload infra leads
to following rcu usage warning:
[ 1938.234856] =============================
[ 1938.234858] WARNING: suspicious RCU usage
[ 1938.234863] 5.3.0-rc1+ #574 Not tainted
[ 1938.234866] -----------------------------
[ 1938.234869] include/net/tc_act/tc_sample.h:47 suspicious rcu_dereference_check() usage!
[ 1938.234872]
other info that might help us debug this:
[ 1938.234875]
rcu_scheduler_active = 2, debug_locks = 1
[ 1938.234879] 1 lock held by tc/19540:
[ 1938.234881] #0 : 00000000b03cb918 (rtnl_mutex){+.+.}, at: tc_new_tfilter+0x47c/0x970
[ 1938.234900]
stack backtrace:
[ 1938.234905] CPU: 2 PID: 19540 Comm: tc Not tainted 5.3.0-rc1+ #574
[ 1938.234908] Hardware name: Supermicro SYS-2028TP-DECR/X10DRT-P, BIOS 2.0b 03/30/2017
[ 1938.234911] Call Trace:
[ 1938.234922] dump_stack+0x85/0xc0
[ 1938.234930] tc_setup_flow_action+0xed5/0x2040
[ 1938.234944] fl_hw_replace_filter+0x11f/0x2e0 [cls_flower]
[ 1938.234965] fl_change+0xd24/0x1b30 [cls_flower]
[ 1938.234990] tc_new_tfilter+0x3e0/0x970
[ 1938.235021] ? tc_del_tfilter+0x720/0x720
[ 1938.235028] rtnetlink_rcv_msg+0x389/0x4b0
[ 1938.235038] ? netlink_deliver_tap+0x95/0x400
[ 1938.235044] ? rtnl_dellink+0x2d0/0x2d0
[ 1938.235053] netlink_rcv_skb+0x49/0x110
[ 1938.235063] netlink_unicast+0x171/0x200
[ 1938.235073] netlink_sendmsg+0x224/0x3f0
[ 1938.235091] sock_sendmsg+0x5e/0x60
[ 1938.235097] ___sys_sendmsg+0x2ae/0x330
[ 1938.235111] ? __handle_mm_fault+0x12cd/0x19e0
[ 1938.235125] ? __handle_mm_fault+0x12cd/0x19e0
[ 1938.235138] ? find_held_lock+0x2b/0x80
[ 1938.235147] ? do_user_addr_fault+0x22d/0x490
[ 1938.235160] __sys_sendmsg+0x59/0xa0
[ 1938.235178] do_syscall_64+0x5c/0xb0
[ 1938.235187] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 1938.235192] RIP: 0033:0x7ff9a4d597b8
[ 1938.235197] Code: 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 65 8f 0c 00 8b 00 85 c0 75 17 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83
ec 28 89 54
[ 1938.235200] RSP: 002b:00007ffcfe381c48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
[ 1938.235205] RAX: ffffffffffffffda RBX: 000000005d4497f9 RCX: 00007ff9a4d597b8
[ 1938.235208] RDX: 0000000000000000 RSI: 00007ffcfe381cb0 RDI: 0000000000000003
[ 1938.235211] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000006
[ 1938.235214] R10: 0000000000404ec2 R11: 0000000000000246 R12: 0000000000000001
[ 1938.235217] R13: 0000000000480640 R14: 0000000000000012 R15: 0000000000000001
Change tcf_sample_psample_group() helper to allow using it from both rtnl
and rcu protected contexts.
Fixes: a7a7be6087b0 ("net/sched: add sample action to the hardware intermediate representation")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-08-06 14:15:39 -07:00
..
2019-05-30 11:29:21 -07:00
2019-07-06 15:29:12 +02:00
2019-05-30 11:29:22 -07:00
2018-09-26 09:56:07 -07:00
2019-07-19 21:27:45 -07:00
2019-06-17 20:20:36 -07:00
2019-06-19 17:09:07 +02:00
2019-06-05 17:37:07 +02:00
2019-07-08 20:16:25 -07:00
2019-08-06 14:15:39 -07:00
2019-03-21 13:26:42 -07:00
2019-06-12 11:00:11 -07:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-02-28 08:24:23 -07:00
2019-06-05 17:37:05 +02:00
2019-05-05 11:25:49 -07:00
2019-01-23 11:18:00 -08:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:37:53 +02:00
2019-05-21 11:28:40 +02:00
2019-07-04 12:30:48 -07:00
2019-07-04 12:30:48 -07:00
2019-04-27 09:07:04 -07:00
2019-06-05 17:37:06 +02:00
2019-05-21 11:28:45 +02:00
2019-06-19 17:09:55 +02:00
2019-07-26 13:50:43 +02:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -07:00
2019-05-21 11:28:45 +02:00
2019-05-30 11:26:32 -07:00
2019-04-19 14:07:40 -07:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:29:52 -07:00
2019-07-09 12:02:13 -07:00
2019-05-21 11:52:39 +02:00
2019-05-21 11:52:39 +02:00
2019-06-14 20:20:07 -07:00
2018-03-05 12:52:45 -05:00
2019-07-01 10:48:34 -07:00
2018-05-20 18:31:42 -04:00
2019-06-19 17:09:55 +02:00
2018-05-28 22:59:54 -04:00
2019-04-22 21:50:53 -07:00
2019-07-11 14:22:53 -07:00
2019-07-09 12:11:59 -07:00
2019-07-19 21:27:45 -07:00
2019-02-27 12:50:17 -08:00
2019-06-05 17:30:27 +02:00
2019-06-05 17:30:27 +02:00
2018-11-17 21:37:29 -08:00
2019-04-27 17:07:22 -04:00
2019-03-22 12:09:31 -07:00
2018-12-10 15:53:04 -08:00
2019-07-01 10:58:23 -07:00
2019-06-09 19:40:10 -07:00
2019-05-30 11:26:32 -07:00
2019-02-22 12:56:24 -08:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:32 -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
2019-05-30 11:26:32 -07:00
2019-07-03 13:51:54 -07:00
2019-05-30 11:26:32 -07:00
2018-10-17 17:45:07 -07:00
2019-06-23 11:12:12 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-09 20:10:19 -07:00
2019-02-08 21:50:15 -08:00
2019-05-30 11:26:32 -07:00
2019-06-24 10:18:49 -07:00
2019-06-27 21:06:39 -07:00
2019-06-18 20:48:45 -04:00
2019-06-24 10:18:48 -07:00
2019-02-27 12:50:17 -08:00
2019-07-08 19:48:57 -07:00
2019-06-14 19:51:12 -07:00
2019-06-19 11:37:47 -04:00
2019-05-22 17:48:43 -07:00
2019-07-08 19:38:03 -07:00
2018-03-27 09:51:23 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2018-07-11 23:10:19 -07:00
2018-04-22 14:55:03 -04:00
2018-09-13 09:04:58 -07:00
2019-04-23 19:42:29 -07:00
2019-06-22 08:59:24 -04:00
2019-05-30 11:26:41 -07:00
2019-05-21 11:28:45 +02:00
2019-06-05 17:36:38 +02:00
2019-06-05 17:36:38 +02:00
2019-04-08 15:22:40 -07:00
2019-04-17 23:19:07 -07:00
2018-05-28 22:59:54 -04:00
2019-07-11 10:55:49 -07:00
2018-08-01 09:52:30 -07:00
2019-05-21 11:28:45 +02:00
2019-06-18 09:45:36 -07:00
2019-05-30 11:26:32 -07:00
2019-04-11 13:59:49 -07:00
2019-06-10 10:44:56 -07:00
2019-07-08 14:58:04 -07:00
2019-05-30 11:26:32 -07:00
2019-07-19 21:27:45 -07:00
2018-09-25 20:17:35 -07:00
2019-05-30 11:26:32 -07:00
2019-04-22 21:50:53 -07:00
2019-05-30 11:26:32 -07:00
2018-08-28 11:11:47 +02:00
2019-06-19 17:46:57 -04:00
2018-05-16 07:23:35 +02:00
2019-06-27 21:06:39 -07:00
2018-03-13 18:37:02 +02:00
2018-11-06 15:00:45 -08:00
2019-04-22 21:47:25 -07:00
2019-07-19 21:27:45 -07:00
2018-07-21 10:43:12 -05:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2018-04-11 10:33:46 -04:00
2019-02-21 10:34:37 -08:00
2019-05-30 11:26:32 -07:00
2019-06-15 01:21:19 +02:00
2019-07-08 19:25:19 -07:00
2018-03-01 21:21:36 -05:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-07-25 17:35:03 -07:00
2019-05-30 11:26:32 -07:00
2018-05-08 00:02:41 -04:00
2019-08-05 13:15:30 -07:00
2018-07-07 10:58:49 +09:00
2019-03-29 10:53:45 -07:00
2019-05-31 08:34:32 -07:00
2018-02-16 15:57:42 -05:00
2019-06-05 17:37:05 +02:00
2019-06-06 11:08:55 -07:00
2018-01-24 19:13:45 -05:00
2019-06-05 17:30:29 +02:00
2019-06-19 11:23:13 -04:00
2019-07-08 19:48:57 -07:00
2019-06-19 11:23:13 -04:00
2019-07-01 06:16:40 +02:00