Bugzilla – Attachment 48528 Details for
Bug 114351
subfs: created wrong mounts in special cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
fix for subfs attempting to mount devices in detached namespaces
subfs-detached-namespace.diff (text/plain), 1.08 KB, created by
Jeff Mahoney
on 2005-09-01 19:44:29 UTC
(
hide
)
Description:
fix for subfs attempting to mount devices in detached namespaces
Filename:
MIME Type:
Creator:
Jeff Mahoney
Created:
2005-09-01 19:44:29 UTC
Size:
1.08 KB
patch
obsolete
>Subject: [PATCH] subfs: refuse mount in deleted directory >From: Jeff Mahoney <jeffm@suse.com> >SUSE-Bugzilla: 114351 > > When hotplug umounts a subfs filesystem and removes the directory, > processes left in the namespace can ultimately mount the filesystem again > in a detached namespace. This results in the sub-filesystem being umountable. > > This patch detects this condition and fails the mount. > >Signed-off-by: Jeff Mahoney <jeffm@suse.com> >--- /usr/src/linux-2.6.13-rc6-git13-4/fs/subfs/subfs.c 2005-08-22 16:58:30.000000000 -0400 >+++ linux-2.6.13-rc6-git13-4/fs/subfs/subfs.c 2005-09-01 15:40:05.000000000 -0400 >@@ -158,6 +158,14 @@ static struct vfsmount *get_child_mount > int result; > unsigned long flags = 0; > >+ /* We're sitting in a detached namespace - >+ * don't mount the filesystem. */ >+ if (mnt->mnt_mountpoint == mnt->mnt_root) { >+ printk (KERN_ERR "subfs: refusing to mount media in " >+ "deleted directory\n"); >+ return ERR_PTR(-ENOENT); >+ } >+ > /* Lookup the child mount - if it's not mounted, mount it */ > child = lookup_mnt (mnt, sfs_mnt->sb->s_root); > if (!child) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 114351
: 48528