Revert "wireless: Use first phyX name available when registering phy devices."
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 11 Oct 2010 18:46:52 +0000 (14:46 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Oct 2010 18:46:52 +0000 (14:46 -0400)
commit7623225f905263424c7254dc6a07bff083a498dd
tree804b483a7aa2c2ad373fbe2e9b30844dea5c886c
parentd86a4f2dd4ec554cf3346f4cab763925761c4095
Revert "wireless: Use first phyX name available when registering phy devices."

This reverts commit 5a254ffe3ffdfa84fe076009bd8e88da412180d2.

The commit failed to take into account that allocated wireless devices
(wiphys) are not added into the device list upon allocation, but only
when they are registered. Therefore, it opened up a race between
allocating and registering a name, so that if two processes allocate and
register concurrently ("alloc, alloc, register, register" rather than
"alloc, register, alloc, register") the code will attempt to use the
same name twice.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c