public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Peter Teoh <htmldeveloper@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Unmatched semaphore usage in fs/super.c
Date: Sun, 2 Mar 2008 07:58:18 +0000	[thread overview]
Message-ID: <20080302075818.GV27894@ZenIV.linux.org.uk> (raw)
In-Reply-To: <804dabb00803012310s7b76e09bqc6d96c25e0618cf9@mail.gmail.com>

On Sun, Mar 02, 2008 at 03:10:35PM +0800, Peter Teoh wrote:
> Please pardon me if wrong.   In fs/super.c, I saw a down_read()
> without a matching (when sb->s_root is non-zero) up_read() as shown
> below:

Correct.  get_super() and user_get_super() return locked superblock.

> Neither did the get_super() caller remember and correct the semaphore
> either.   Is this a problem?

It would be, if it would be true.  Take a look at drop_super().

      reply	other threads:[~2008-03-02  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02  7:10 Unmatched semaphore usage in fs/super.c Peter Teoh
2008-03-02  7:58 ` Al Viro [this message]

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=20080302075818.GV27894@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=htmldeveloper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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