Re: [PATCH] Fix removable USB drive oops
From: James Bottomley
Date: Thu Mar 18 2004 - 08:38:03 EST
On Wed, 2004-03-17 at 19:58, Greg KH wrote:
> Bah, this was my fault, sorry.
>
> Here's a patch that should fix this, and prevent you from needing this
> patch. Can you verify this?
No, no. It was Martin's fault: He used a NULL class to indicate that we
had no transport class.
The registration code in SCSI looks like:
if (sdev->transport_classdev.class) {
error = class_device_add(&sdev->transport_classdev);
i.e. only add the device if we actually have a transport class. The
oops was caused because the unregister code was unconditional (i.e.
unregister a device we never registered in the first place). The patch
(among other things) makes it conditional on the
sdev->transport_classdev.class like the registration.
James
-
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/