Jiri Pirko a8b7b2d0b3 sched: sch_api: add missing rcu read lock to silence the warning
In case the qdisc_match_from_root function() is called from non-rcu path
with rtnl mutex held, a suspiciout rcu usage warning appears:

[  241.504354] =============================
[  241.504358] WARNING: suspicious RCU usage
[  241.504366] 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32 Not tainted
[  241.504370] -----------------------------
[  241.504378] net/sched/sch_api.c:270 RCU-list traversed in non-reader section!!
[  241.504382]
               other info that might help us debug this:
[  241.504388]
               rcu_scheduler_active = 2, debug_locks = 1
[  241.504394] 1 lock held by tc/1391:
[  241.504398]  #0: ffffffff85a27850 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x49a/0xbd0
[  241.504431]
               stack backtrace:
[  241.504440] CPU: 0 PID: 1391 Comm: tc Not tainted 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32
[  241.504446] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014
[  241.504453] Call Trace:
[  241.504465]  dump_stack+0x100/0x184
[  241.504482]  lockdep_rcu_suspicious+0x153/0x15d
[  241.504499]  qdisc_match_from_root+0x293/0x350

Fix this by passing the rtnl held lockdep condition down to
hlist_for_each_entry_rcu()

Reported-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-20 17:00:02 -07:00
..
2020-05-17 21:10:28 -07:00
2020-06-04 20:11:25 -07:00
2020-06-05 14:05:57 -07:00
2020-06-03 09:21:52 +02:00
2020-06-25 22:25:13 -07:00
2020-06-11 12:22:41 -07:00
2020-04-08 21:03:40 -07:00
2020-03-31 10:05:01 -07:00
2020-05-09 16:15:13 -06:00
2020-05-24 20:48:11 +02:00
2020-07-04 09:35:43 -05:00
2020-06-02 19:59:25 -07:00
2020-07-08 10:48:35 -07:00
2020-05-19 09:40:29 -06:00
2020-04-10 15:36:21 -07:00
2020-06-25 08:24:32 -07:00
2020-05-13 08:44:35 -07:00
2020-03-09 11:12:19 +01:00
2020-06-02 15:04:15 -07:00
2020-05-04 11:19:58 -07:00
2020-03-06 11:06:15 +01:00
2020-06-02 15:37:03 -07:00
2020-06-09 09:39:13 -07:00
2020-05-28 07:59:45 -07:00
2020-07-19 19:20:22 -07:00
2020-04-30 12:54:01 -07:00
2020-06-08 11:42:23 -07:00
2020-06-07 10:59:32 -07:00
2020-05-18 10:30:21 +01:00
2020-06-02 15:15:46 +01:00
2020-03-30 18:51:47 -07:00
2020-06-27 15:20:03 -07:00
2020-05-08 18:18:11 +01:00
2020-05-08 00:12:42 +02:00
2020-05-28 10:31:09 +02:00
2020-06-10 13:42:09 -07:00
2020-04-08 21:03:40 -07:00
2020-03-06 11:56:59 +01:00
2020-04-07 10:43:38 -07:00
2020-06-09 15:40:50 -07:00
2020-03-21 16:00:24 +01:00
2020-05-09 13:57:12 +02:00
2020-04-02 09:35:27 -07:00
2020-05-15 13:51:28 -07:00
2020-05-09 13:57:12 +02:00
2020-06-07 10:53:36 -07:00
2020-03-21 16:00:24 +01:00
2020-02-21 10:31:18 +01:00
2020-03-21 16:00:24 +01:00
2020-05-17 14:10:07 -06:00
2020-05-14 16:44:24 +02:00
2020-04-28 11:05:44 +02:00
2020-06-24 11:21:03 -07:00
2020-03-30 18:51:47 -07:00
2020-05-04 09:16:37 -07:00
2020-02-21 11:22:15 -08:00
2020-05-29 14:52:53 +02:00
2020-07-04 09:35:36 -05:00
2020-07-07 11:58:59 -05:00
2020-03-23 17:01:47 +01:00
2020-04-01 12:06:26 -04:00
2020-04-17 06:05:30 -04:00
2020-06-26 00:27:38 -07:00