From: Al Viro <viro@ZenIV.linux.org.uk>
To: Kai <wildex999@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BUG?: super.c:sget spin_lock not released?
Date: Fri, 30 May 2014 00:19:22 +0100 [thread overview]
Message-ID: <20140529231921.GO18016@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+jWvaKyLPfFb6b-aGCz8RhCCcsSZ+kz5Co3xSKwPOhsguHFMA@mail.gmail.com>
On Fri, May 30, 2014 at 12:49:56AM +0200, Kai wrote:
> Hello,
>
> I have recently been playing around with writing a custom filesystem
> for Linux, and have been reading the source of other filesystems, and
> the functions they call into the linux kernel.
> While looking at the function sget in super.c I found something strange.
>
> before if(test) it takes a spinlock, however there seems to be two
> cases where it does not unlock it.
> (Kernel 3.14, super.c line 441)
>
> One:
> if(!grab_super(old)) goto retry;
> Will jump to before spin_lock(), without releasing it first.
Er... So either grab_super() releases that spinlock, or that thing
is screwed. The next obvious step would be to look into grab_super()...
> Two:
> And if it finds an old sb, it will return without releasing the lock.
... unless something it calls does just that.
next prev parent reply other threads:[~2014-05-29 23:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 22:49 BUG?: super.c:sget spin_lock not released? Kai
2014-05-29 23:19 ` Al Viro [this message]
2014-05-29 23:37 ` Kai
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=20140529231921.GO18016@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=wildex999@gmail.com \
/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