On Fri 20 Sep 2019 at 01:49, Eric Dumazet <eric.duma...@gmail.com> wrote: > On 9/19/19 1:14 PM, Vlad Buslov wrote: >> Recent changes that removed rtnl dependency from rules update path of tc >> also made tcf_block_put() function sleeping. This function is called from >> ops->destroy() of several Qdisc implementations, which in turn is called by >> qdisc_put(). Some Qdiscs call qdisc_put() while holding sch tree spinlock, >> which results sleeping-while-atomic BUG. >> > > > Note that calling qdisc_put() while holding sch tree lock can also > trigger deadlocks. > > For example sch_pie.c has a del_timer_sync() in pie_destroy(), > while the pie_timer() timer handler acquires the root_lock. > > (there are other cases like that, SFQ for example)
These and other examples of sleeping calls in cls APIs used by tcf_block_put() that I described in one of my previous emails make me think that putting might_sleep() at the beginning of qdisc_put() would be a good idea, instead of waiting for syzbot to find correct combination to trigger a crash.