[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpXx-EBQFHjNiwHG--uoUbVcJ61gahpwqKVkQ3k=1iU=Cw@mail.gmail.com>
Date: Mon, 13 Aug 2018 16:01:45 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: David Miller <davem@...emloft.net>
Cc: Vlad Buslov <vladbu@...lanox.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next] net: sched: act_ife: disable bh when taking ife_mod_lock
On Mon, Aug 13, 2018 at 3:53 PM David Miller <davem@...emloft.net> wrote:
>
> From: Cong Wang <xiyou.wangcong@...il.com>
> Date: Mon, 13 Aug 2018 12:16:52 -0700
>
> > Your fix doesn't make sense, because what ife_mod_lock protects
> > is absolutely not touched in BH context, they have no race.
>
> It does make sense, the problem is if you acquire ife_mod_lock and
> take a software interrupt while you hold it.
>
> If that software interrupt takes the tcfa_lock, we're setup for an
> AB-BA deadlock.
The lockdep does make sense, for sure. The fix does NOT.
>
> And there is also no easy way to reverse the lock ordering to
> avoid this either.
There is.
>
> I therefore think his fix is perfectly fine and that's why I
> applied it.
I will send a revert and a better fix.
Thanks.
Powered by blists - more mailing lists