mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 02:23:05 +00:00
This patch (as1155) fixes a bug in usbcore. When interfaces are deleted, either because the device was disconnected or because of a configuration change, the extra attribute files and child endpoint devices may get left behind. This is because the core removes them before calling device_del(). But during device_del(), after the driver is unbound the core will reinstall altsetting 0 and recreate those extra attributes and children. The patch prevents this by adding a flag to record when the interface is in the midst of being unregistered. When the flag is set, the attribute files and child devices will not be created. Signed-off-by: Alan Stern <[email protected]> Cc: stable <[email protected]> [2.6.27, 2.6.26, 2.6.25] Signed-off-by: Greg Kroah-Hartman <[email protected]>