[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eced0989-d8bc-d34e-9ecb-8540d80a7173@6wind.com>
Date: Thu, 20 Oct 2016 12:17:18 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Cong Wang <xiyou.wangcong@...il.com>, netdev@...r.kernel.org
Cc: sds@...ho.nsa.gov, e@...draz.com, paul@...l-moore.com
Subject: Re: [Patch net] net: saving irq context for peernet2id()
Le 20/10/2016 à 08:52, Cong Wang a écrit :
> A kernel warning inside __local_bh_enable_ip() was reported by people
> running SELinux, this is caused due to some SELinux functions
> (indirectly) call peernet2id() with IRQ disabled in process context,
> when we re-enable BH with IRQ disabled kernel complains. Shut up this
> warning by saving IRQ context in peernet2id(), BH is still implicitly
> disabled.
Franckly, reverting the original patch seems better for me. The intention for
that patch was "it's not needed", see the commit log:
"We never read or change netns id in hardirq context,
the only place we read netns id in softirq context
is in vxlan_xmit(). So, it should be enough to just
disable BH."
Now, we see that "it's needed" and that the analysis was wrong. If a race is
introduced by this patch, it will be hard to detect and fix it.
Regards,
Nicolas
Powered by blists - more mailing lists