[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87lgzae3f7.fsf@doppelsaurus.mobileactivedefense.com>
Date: Fri, 2 Sep 2016 16:18:04 +0100
From: Rainer Weikusat <rweikusat@...eradapt.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
CC: Al Viro <viro@...iv.linux.org.uk>, CAI Qian <caiqian@...hat.com>,
"Miklos Szeredi" <miklos@...redi.hu>,
Rainer Weikusat <rweikusat@...eradapt.com>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Rainer Weikusat <rweikusat@...ileactivedefense.com>,
Eric Sandeen <esandeen@...hat.com>,
Network Development <netdev@...r.kernel.org>
Subject: Re: possible circular locking dependency detected
Linus Torvalds <torvalds@...ux-foundation.org> writes:
> On Thu, Sep 1, 2016 at 2:43 PM, Linus Torvalds
> <torvalds@...ux-foundation.org> wrote:
>> On Thu, Sep 1, 2016 at 2:01 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
>>>
>>> Outside as in "all fs activity in bind happens under it". Along with
>>> assignment to ->u.addr, etc. IOW, make it the outermost lock there.
>>
>> Hah, yes. I misunderstood you.
>>
>> Yes. In fact that fixes the problem I mentioned, rather than introducing it.
>
> So the easiest approach would seem to be to revert commit c845acb324aa
> ("af_unix: Fix splice-bind deadlock"), and then apply the lock split.
>
> Like the attached two patches.
>
> This is still *entirely* untested.
As far as I can tell, this should work as I can't currently imagine why
a fs operation might end up binding a unix socket despite the idea to
make af_unix.c yet more complicated in order to work around irregular
behaviour of (as far as I can tell) a single filesystem (for which
kern_path_create doesn't really mean kern_path_create and it has to work
around that once it gets control) goes against all instincts I have in
this area. If filesystems need to do arbitrary stuff when
__sb_start_write is called for 'their' superblock, they should be able
to do so directly.
At present, this is a theoretic concern as I can't (due to other work
committments) put any non-cursory work into this before Sunday. There
may also be other reasons why this idea is impractical or even
unworkable.
Powered by blists - more mailing lists