All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Jan Blunck <jblunck@suse.de>
Cc: Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Christoph Hellwig <hch@lst.de>
Subject: Re: [patch 2/2] r/o bind mounts: Accept passing a mnt NULL pointer to mnt_drop_write()
Date: Fri, 12 Oct 2007 09:10:11 -0700	[thread overview]
Message-ID: <1192205411.20859.52.camel@localhost> (raw)
In-Reply-To: <20071012155020.197228145@hasse.suse.de>

On Fri, 2007-10-12 at 17:50 +0200, Jan Blunck wrote:
> In case of somebody opens a file with dentry_open(dentry, NULL, ...) we don't
> want to stumble on the NULL pointer mnt in struct file. 
...
> +++ b/fs/namespace.c
> @@ -253,6 +253,9 @@ void mnt_drop_write(struct vfsmount *mnt
>         int must_check_underflow = 0;
>         struct mnt_writer *cpu_writer;
> 
> +       if (!mnt)
> +               return;

I kinda wish we'd fix these in the callers.  I know we do something
similar to this with mntput(), but I worry a bit that this just
discourages people from using the right interfaces.

Do you have a case where we're actually getting a NULL mount in here?
We had at least one in reiser4 that really revealed some nastiness in
the fs that needed fixing.

-- Dave


  reply	other threads:[~2007-10-12 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12 15:50 [patch 0/2] r/o bind mount fixes for 2.6.23-mm1 Jan Blunck
2007-10-12 15:50 ` [patch 1/2] r/o bind mounts: Dont touch the vfsmount after path_put() Jan Blunck
2007-10-12 16:06   ` Dave Hansen
2007-10-12 15:50 ` [patch 2/2] r/o bind mounts: Accept passing a mnt NULL pointer to mnt_drop_write() Jan Blunck
2007-10-12 16:10   ` Dave Hansen [this message]
2007-10-13 11:25   ` Christoph Hellwig

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=1192205411.20859.52.camel@localhost \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=jblunck@suse.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.