aboutsummaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-12-14 14:24:28 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-12-14 14:24:28 -0800
commitd6925801d4592f079204e39af50a951f415ec130 (patch)
tree6b4fbe222aa24e4fe125decfbe587aa21477a022 /driver
parentd1e4e83a8275c2e504721c6118b45355a41b4a7a (diff)
downloadpatches-d6925801d4592f079204e39af50a951f415ec130.tar.gz
sysfs patch
Diffstat (limited to 'driver')
-rw-r--r--driver/sysfs-handle-failures-in-sysfs_make_dirent.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/driver/sysfs-handle-failures-in-sysfs_make_dirent.patch b/driver/sysfs-handle-failures-in-sysfs_make_dirent.patch
new file mode 100644
index 00000000000000..e53362137c8e39
--- /dev/null
+++ b/driver/sysfs-handle-failures-in-sysfs_make_dirent.patch
@@ -0,0 +1,33 @@
+From rostedt@goodmis.org Wed Nov 23 06:17:26 2005
+Subject: sysfs: handle failures in sysfs_make_dirent
+From: Steven Rostedt <rostedt@goodmis.org>
+To: <maneesh@in.ibm.com>
+Cc: Greg KH <greg@kroah.com>, Ingo Molnar <mingo@elte.hu>
+Date: Wed, 23 Nov 2005 09:15:44 -0500
+Message-Id: <1132755344.13395.32.camel@localhost.localdomain>
+
+I noticed that if sysfs_make_dirent fails to allocate the sd, then a
+null will be passed to sysfs_put.
+
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/sysfs/dir.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/fs/sysfs/dir.c
++++ gregkh-2.6/fs/sysfs/dir.c
+@@ -112,7 +112,11 @@ static int create_dir(struct kobject * k
+ }
+ }
+ if (error && (error != -EEXIST)) {
+- sysfs_put((*d)->d_fsdata);
++ struct sysfs_dirent *sd = (*d)->d_fsdata;
++ if (sd) {
++ list_del_init(&sd->s_sibling);
++ sysfs_put(sd);
++ }
+ d_drop(*d);
+ }
+ dput(*d);