Re: [PATCH] More Driver Core patches for 2.6.10-rc1

From: Greg KH
Date: Thu Nov 04 2004 - 19:59:58 EST


ChangeSet 1.2449.2.7, 2004/11/04 10:55:28-08:00, tj@xxxxxxxxxxx

[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@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/