driver-core: fix potential race condition in drivers/base/dd.c
authorStefani Seibold <stefani@seibold.net>
Sat, 6 Mar 2010 16:50:14 +0000 (17:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 21 May 2010 16:37:29 +0000 (09:37 -0700)
commitfbb88fadf7dc2dd6d0d1aa88ff521b2f8552996a
treeaf4979113cb3b7fbd8fdbba5cad35a7cb185e9b3
parent6f18ff91d926ab411749a199b06a49f6bc72e9af
driver-core: fix potential race condition in drivers/base/dd.c

This patch fix a potential race condition in the driver_bound() function
in the file driver/base/dd.c.

The broadcast of the BUS_NOTIFY_BOUND_DRIVER notifier should be done
after adding the new device to the driver list. Otherwise notifier
listener will fail if they use functions like usb_find_interface().

The patch is against kernel 2.6.33. Please merge it.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/dd.c