Re: [PATCH] driver-core: fix race between device_register anddriver_register

From: Greg KH
Date: Tue Apr 12 2011 - 13:31:33 EST


On Tue, Apr 12, 2011 at 07:05:37PM +0200, Sebastian Ott wrote:
>
> When a device is registered to a bus it will be a) added to the list
> of devices of the bus and b) bind to a driver (if one matches). As a
> result of a driver being registered at this bus between a) and b) this
> device could already be bound to a driver. This leads to a warning
> and incorrect refcounting.
> To fix this add a check to device_attach to identify an already bound
> device.
>
> Signed-off-by: Sebastian Ott <sebott@xxxxxxxxxxxxxxxxxx>

Thanks, I'll queue this up for .40.

greg k-h
--
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/