[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpUbPidrm+DucpDO4yTaW=o3Pw=mYNTon9uYi4_O36Aw+A@mail.gmail.com>
Date: Wed, 8 Jul 2020 12:09:04 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Petr Machata <petrm@...lanox.com>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Jiri Pirko <jiri@...lanox.com>,
Ido Schimmel <idosch@...lanox.com>
Subject: Re: [PATCH net-next v1 2/5] net: sched: Introduce helpers for qevent blocks
On Wed, Jul 8, 2020 at 9:21 AM Petr Machata <petrm@...lanox.com> 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.
Powered by blists - more mailing lists