Re: [PATCH] Fix mountpoint reference leakage in linkat

From: Jeff Layton
Date: Fri Jan 31 2014 - 18:11:43 EST


On Fri, 31 Jan 2014 22:30:14 +0000
Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:

> On Fri, Jan 31, 2014 at 04:32:31PM -0500, Jeff Layton wrote:
>
> > done_path_create(&new_path, new_dentry);
> > + path_put(&old_path);
>
> ... and the filesystem in question isn't pinned anymore, so it can be
> unmounted, except that
>
> > if (delegated_inode) {
> > error = break_deleg_wait(&delegated_inode);
>
> this does an iput() on delegated_inode. And umount really doesn't
> like finding pinned inodes. Sorry, no go.
>
> I'm going with Oleg's patch with second path_put() added.

Good point. I hadn't considered that. Oleg's second patch looks good to
me too.

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