aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-11-19 15:20:05 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-11-19 15:20:05 -0800
commitce17b75ad619a771a2f3998f8ebd8a18d75a5f0a (patch)
treeb1051976fa82a1de6267d65d8ed72c4d06cc3828
parent5f1f80e7fbca68c288c9bbc6379fc904c8e46d20 (diff)
downloadpatches-ce17b75ad619a771a2f3998f8ebd8a18d75a5f0a.tar.gz
devtmpfs fix
-rw-r--r--driver-core/driver-core-devtmpfs-do-not-remove-non-kernel-created-directories.patch2
-rw-r--r--driver-core/driver-core-devtmpfs-ignore-umask-while-setting-file-mode.patch9
-rw-r--r--driver-core/driver-core-devtmpfs-prevent-concurrent-subdirectory-creation-and-removal.patch6
-rw-r--r--driver-core/driver-core-devtmpfs-set-root-directory-mode-to-0755.patch2
-rw-r--r--driver-core/driver-core-devtmpfs-use-sys_mount.patch4
5 files changed, 12 insertions, 11 deletions
diff --git a/driver-core/driver-core-devtmpfs-do-not-remove-non-kernel-created-directories.patch b/driver-core/driver-core-devtmpfs-do-not-remove-non-kernel-created-directories.patch
index 7059cb9b697a20..3d81202409af87 100644
--- a/driver-core/driver-core-devtmpfs-do-not-remove-non-kernel-created-directories.patch
+++ b/driver-core/driver-core-devtmpfs-do-not-remove-non-kernel-created-directories.patch
@@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return err;
}
-@@ -211,16 +199,21 @@ static int dev_rmdir(const char *name)
+@@ -213,16 +201,21 @@ static int dev_rmdir(const char *name)
mutex_lock_nested(&nd.path.dentry->d_inode->i_mutex, I_MUTEX_PARENT);
dentry = lookup_one_len(nd.last.name, nd.path.dentry, nd.last.len);
if (!IS_ERR(dentry)) {
diff --git a/driver-core/driver-core-devtmpfs-ignore-umask-while-setting-file-mode.patch b/driver-core/driver-core-devtmpfs-ignore-umask-while-setting-file-mode.patch
index 780824bfa9c34d..7510f4eacfb965 100644
--- a/driver-core/driver-core-devtmpfs-ignore-umask-while-setting-file-mode.patch
+++ b/driver-core/driver-core-devtmpfs-ignore-umask-while-setting-file-mode.patch
@@ -3,7 +3,6 @@ From: Kay Sievers <kay.sievers@vrfy.org>
Date: Wed, 28 Oct 2009 19:50:57 +0100
Subject: Driver Core: devtmpfs: ignore umask while setting file mode
To: Greg KH <greg@kroah.com>
-Cc: linux-kernel <linux-kernel@vger.kernel.org>
Message-ID: <1256755857.2618.320.camel@yio.site>
@@ -13,12 +12,12 @@ Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
- drivers/base/devtmpfs.c | 24 ++++++++++++++----------
- 1 file changed, 14 insertions(+), 10 deletions(-)
+ drivers/base/devtmpfs.c | 26 ++++++++++++++++----------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
-@@ -156,34 +156,38 @@ int devtmpfs_create_node(struct device *
+@@ -156,34 +156,40 @@ int devtmpfs_create_node(struct device *
mode |= S_IFCHR;
curr_cred = override_creds(&init_cred);
@@ -52,7 +51,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+ /* fixup possibly umasked mode */
+ newattrs.ia_mode = mode;
+ newattrs.ia_valid = ATTR_MODE;
++ mutex_lock(&dentry->d_inode->i_mutex);
+ notify_change(dentry, &newattrs);
++ mutex_unlock(&dentry->d_inode->i_mutex);
+
+ /* mark as kernel-created inode */
dentry->d_inode->i_private = &dev_mnt;
diff --git a/driver-core/driver-core-devtmpfs-prevent-concurrent-subdirectory-creation-and-removal.patch b/driver-core/driver-core-devtmpfs-prevent-concurrent-subdirectory-creation-and-removal.patch
index f75606a1ea4a01..7b0d74bba501e6 100644
--- a/driver-core/driver-core-devtmpfs-prevent-concurrent-subdirectory-creation-and-removal.patch
+++ b/driver-core/driver-core-devtmpfs-prevent-concurrent-subdirectory-creation-and-removal.patch
@@ -78,7 +78,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return err;
}
-@@ -232,7 +234,8 @@ static int delete_path(const char *nodep
+@@ -234,7 +236,8 @@ static int delete_path(const char *nodep
if (!path)
return -ENOMEM;
@@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
char *base;
base = strrchr(path, '/');
-@@ -243,6 +246,7 @@ static int delete_path(const char *nodep
+@@ -245,6 +248,7 @@ static int delete_path(const char *nodep
if (err)
break;
}
@@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kfree(path);
return err;
-@@ -358,6 +362,8 @@ int __init devtmpfs_init(void)
+@@ -360,6 +364,8 @@ int __init devtmpfs_init(void)
int err;
struct vfsmount *mnt;
diff --git a/driver-core/driver-core-devtmpfs-set-root-directory-mode-to-0755.patch b/driver-core/driver-core-devtmpfs-set-root-directory-mode-to-0755.patch
index 0d86cd68e869a2..774f93e0ebe313 100644
--- a/driver-core/driver-core-devtmpfs-set-root-directory-mode-to-0755.patch
+++ b/driver-core/driver-core-devtmpfs-set-root-directory-mode-to-0755.patch
@@ -18,7 +18,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
-@@ -359,7 +359,7 @@ int __init devtmpfs_init(void)
+@@ -361,7 +361,7 @@ int __init devtmpfs_init(void)
return err;
}
diff --git a/driver-core/driver-core-devtmpfs-use-sys_mount.patch b/driver-core/driver-core-devtmpfs-use-sys_mount.patch
index 1423cdbbf1d32e..4cb3581943e4c3 100644
--- a/driver-core/driver-core-devtmpfs-use-sys_mount.patch
+++ b/driver-core/driver-core-devtmpfs-use-sys_mount.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
-@@ -330,9 +330,8 @@ out:
+@@ -332,9 +332,8 @@ out:
* If configured, or requested by the commandline, devtmpfs will be
* auto-mounted after the kernel mounted the root filesystem.
*/
@@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
int err;
if (!dev_mount)
-@@ -341,15 +340,11 @@ int devtmpfs_mount(const char *mountpoin
+@@ -343,15 +342,11 @@ int devtmpfs_mount(const char *mountpoin
if (!dev_mnt)
return 0;