Re: 2.6.17-rc4-mm1

From: Jean Delvare
Date: Tue May 16 2006 - 11:22:52 EST

Quoting myself:
> And the winner is...
> gregkh-driver-driver-core-class_device_add-needs-error-checks.patch
> Stephen, Greg?

Indeed this patch breaks class_device_add in the success case...

Andrew, maybe you want to put this in the hot-fixes directory for
2.6.17-rc1-mm4, as the problem hits all drivers which register with a

Fix class_device_add success case after
broke it. class_dev was no more put and class_name was no more freed
before leaving. The former caused locks on driver removal (class_dev
usage count could never be 0.)

This fix should be folded into

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
drivers/base/class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.17-rc4-mm1.orig/drivers/base/class.c 2006-05-16 16:38:02.000000000 +0200
+++ linux-2.6.17-rc4-mm1/drivers/base/class.c 2006-05-16 17:00:24.000000000 +0200
@@ -620,7 +620,7 @@

- return 0;
+ goto out1;

if (class_dev->dev)

Jean Delvare
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at