On Wed, Jul 8, 2020 at 9:21 AM Petr Machata [off-list ref] wrote:
Actually I guess I could qdisc_refcount_inc() the current qdisc so that
it doesn't go away. Then when enqueing I could access the child
directly, not relying on the now-obsolete cache from the beginning of
the enqueue function. I suppose that a similar approach could be used in
other users of tcf_classify() as well. What do you think?
The above example is just a quick one I can think of, there could be
more race conditions that lead to other kinds of bugs.
I am sure you can fix that one, but the point is that it is hard to
audit and fix them all. The best solution here is of course not to
release that lock, but again it requires some more work to avoid
the deadlock.
Thanks.