Skip to content

Commit 0ee1362

Browse files
Florian Westphaldavem330
authored andcommitted
htb: call qdisc_root with rcu read lock held
saw a debug splat: net/include/net/sch_generic.h:287 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 0 2 locks held by kworker/2:1/710: #0: ("events"){.+.+.+}, at: [<ffffffff8106ca1d>] #1: ((&q->work)){+.+...}, at: [<ffffffff8106ca1d>] process_one_work+0x14d/0x690 Workqueue: events htb_work_func Call Trace: [<ffffffff812dc763>] dump_stack+0x85/0xc2 [<ffffffff8109fee7>] lockdep_rcu_suspicious+0xe7/0x120 [<ffffffff814ced47>] htb_work_func+0x67/0x70 Signed-off-by: Florian Westphal <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ebecaa6 commit 0ee1362

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/sched/sch_htb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,9 @@ static void htb_work_func(struct work_struct *work)
10071007
struct htb_sched *q = container_of(work, struct htb_sched, work);
10081008
struct Qdisc *sch = q->watchdog.qdisc;
10091009

1010+
rcu_read_lock();
10101011
__netif_schedule(qdisc_root(sch));
1012+
rcu_read_unlock();
10111013
}
10121014

10131015
static int htb_init(struct Qdisc *sch, struct nlattr *opt)

0 commit comments

Comments
 (0)