lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1192205411.20859.52.camel@localhost>
Date:	Fri, 12 Oct 2007 09:10:11 -0700
From:	Dave Hansen <haveblue@...ibm.com>
To:	Jan Blunck <jblunck@...e.de>
Cc:	Linux-Kernel Mailinglist <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>, Christoph Hellwig <hch@....de>
Subject: Re: [patch 2/2] r/o bind mounts: Accept passing a mnt NULL pointer
	to mnt_drop_write()

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ