This patch clears mnt_namespace in an expired mount.
If mnt_namespace is not cleared, it's possible to attach a new mount
to the already detached mount, because check_mnt() can return true.
The effect is a resource leak, since the resulting tree will never be
freed.
An earlier patch doing the same for regular umount has already been
applied (namespacec-fix-mnt_namespace-clearing.patch).
Signed-off-by: Miklos Szeredi <[email protected]>
Index: linux/fs/namespace.c
===================================================================
--- linux.orig/fs/namespace.c 2005-05-22 11:52:56.000000000 +0200
+++ linux/fs/namespace.c 2005-05-22 11:52:59.000000000 +0200
@@ -843,6 +843,7 @@ static void expire_mount(struct vfsmount
/* delete from the namespace */
list_del_init(&mnt->mnt_list);
+ mnt->mnt_namespace = NULL;
detach_mnt(mnt, &old_nd);
spin_unlock(&vfsmount_lock);
path_release(&old_nd);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]