lkml.org 
[lkml]   [2004]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] More Driver Core patches for 2.6.10-rc1
Date
From
ChangeSet 1.2449.2.7, 2004/11/04 10:55:28-08:00, tj@home-tj.org

[PATCH] driver-model: kobject_add() error path reference counting fix

df_04_kobject_add_ref_fix.patch

In kobject_add(), @kobj wasn't put'd properly on error path. This
patch fixes it.


Signed-off-by: Tejun Heo <tj@home-tj.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


lib/kobject.c | 1 +
1 files changed, 1 insertion(+)


diff -Nru a/lib/kobject.c b/lib/kobject.c
--- a/lib/kobject.c 2004-11-04 16:30:32 -08:00
+++ b/lib/kobject.c 2004-11-04 16:30:32 -08:00
@@ -183,6 +183,7 @@
unlink(kobj);
if (parent)
kobject_put(parent);
+ kobject_put(kobj);
} else {
kobject_hotplug(kobj, KOBJ_ADD);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.053 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site