From: Rainer Weikusat <rweikusat@cyberadapt.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>, CAI Qian <caiqian@redhat.com>,
"Miklos Szeredi" <miklos@szeredi.hu>,
Rainer Weikusat <rweikusat@cyberadapt.com>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
Rainer Weikusat <rweikusat@mobileactivedefense.com>,
Eric Sandeen <esandeen@redhat.com>,
Network Development <netdev@vger.kernel.org>
Subject: Re: possible circular locking dependency detected
Date: Fri, 2 Sep 2016 16:18:04 +0100 [thread overview]
Message-ID: <87lgzae3f7.fsf@doppelsaurus.mobileactivedefense.com> (raw)
In-Reply-To: <CA+55aFwntZpaAutp_C=sLBg8ravfYGRoF4TTG1cfE3SjaJEOtw@mail.gmail.com> (Linus Torvalds's message of "Thu, 1 Sep 2016 15:04:38 -0700")
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Thu, Sep 1, 2016 at 2:43 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>> On Thu, Sep 1, 2016 at 2:01 PM, Al Viro <viro@zeniv.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.
next prev parent reply other threads:[~2016-09-02 16:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+55aFy0cQq569m=0umnqZe6HJp8eQX2ed-yi=Fmntuhd2AM=Q@mail.gmail.com>
[not found] ` <87h99zo4d8.fsf@doppelsaurus.mobileactivedefense.com>
[not found] ` <CA+55aFwcPK_wXS8SE5wPitCXUewZ1+OGqVrWxvvU8tVDuCeHWA@mail.gmail.com>
[not found] ` <CA+55aFxGW8_DpYa6rZAq0s7zzFCB58U=7Kgy1T+7cY2=TasGrw@mail.gmail.com>
[not found] ` <871t13o1n1.fsf@doppelsaurus.mobileactivedefense.com>
[not found] ` <CA+55aFzbCDwOTbHiawpY2xSaR_EBkTDbYeJV3CH09OLLtPW3nw@mail.gmail.com>
[not found] ` <6f7d587b-3933-7c02-a804-db1732ced1cf@stressinduktion.org>
[not found] ` <CA+55aFyNJg_brA4rGF0S2ve0V_2vuhZCFKEMFDNhHKEXoVCRGA@mail.gmail.com>
[not found] ` <20160901204746.GR2356@ZenIV.linux.org.uk>
[not found] ` <CA+55aFxzRnLCev6i_ehw9LFf-dw3s0znF+nP_c86i=219OZhfg@mail.gmail.com>
[not found] ` <20160901210142.GS2356@ZenIV.linux.org.uk>
[not found] ` <CA+55aFzxJM4pbS_jySERnCoOvvPbo+FgM7FZEATLJnCseD0j0g@mail.gmail.com>
2016-09-01 22:04 ` possible circular locking dependency detected Linus Torvalds
2016-09-02 14:43 ` CAI Qian
2016-09-02 15:51 ` CAI Qian
2016-09-02 16:46 ` CAI Qian
2016-09-02 17:10 ` Linus Torvalds
2016-09-02 15:18 ` Rainer Weikusat [this message]
2016-09-02 16:00 ` Al Viro
2016-09-02 16:10 ` Rainer Weikusat
2016-09-02 17:02 ` Al Viro
2016-09-02 17:12 ` Linus Torvalds
2016-09-02 17:40 ` Rainer Weikusat
2016-09-02 17:53 ` Al Viro
2016-09-02 17:52 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgzae3f7.fsf@doppelsaurus.mobileactivedefense.com \
--to=rweikusat@cyberadapt.com \
--cc=caiqian@redhat.com \
--cc=esandeen@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=miklos@szeredi.hu \
--cc=netdev@vger.kernel.org \
--cc=rweikusat@mobileactivedefense.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).