Re: SELinux + ubifs: possible circular locking dependency

From: Artem Bityutskiy
Date: Wed Feb 13 2013 - 07:47:49 EST

On Fri, 2013-02-08 at 15:10 +0100, Marc Kleine-Budde wrote:
> Hello,
> I'm on a arm imx28 v3.8-rc6 (+ a handfull of patches to support the
> custom board) but no modifications on ubifs, selinux or the vfs layer.
> And not including the xattr patches by Subodh Nijsure.
> When booting with SELinux and lockdep enabled I see this _possible_
> circular locking dependency:

I guess one needs to really understand how lockdep works, because it
seems there is no direct 'tnc_mutex -> isec->lock', and lockdep somehow
deducts this connection inderectly.

However, it seems I see what _may_ be the reason, and here is a patch
which I think may fix the issue. Would you please test/review it? It is
inlined and also attached.