From: Miklos Szeredi 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. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton --- fs/namespace.c | 1 + 1 files changed, 1 insertion(+) diff -puN fs/namespace.c~namespacec-fix-mnt_namespace-zeroing-for-expired-mounts fs/namespace.c --- 25/fs/namespace.c~namespacec-fix-mnt_namespace-zeroing-for-expired-mounts Wed May 25 14:37:43 2005 +++ 25-akpm/fs/namespace.c Wed May 25 14:37:43 2005 @@ -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); _