mac80211: fix modprobe deadlock by not calling wep_init under rtnl_lock
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Wed, 29 Apr 2009 10:41:24 +0000 (11:41 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Apr 2009 20:48:33 +0000 (16:48 -0400)
commitd4c4a9a1bce1912ed5681251f0037fd4f2364a3e
tree85c5631e48bf75bfdb3e52634a983e4f7c46f06d
parentb7fcb5c4a4c27da2f6d86cb03d18687e537442cf
mac80211: fix modprobe deadlock by not calling wep_init under rtnl_lock

- ieee80211_wep_init(), which is called with rtnl_lock held, blocks in
   request_module() [waiting for modprobe to load a crypto module].

 - modprobe blocks in a call to flush_workqueue(), when it closes a TTY
   [presumably when it exits].

 - The workqueue item linkwatch_event() blocks on rtnl_lock.

There's no reason for wep_init() to be called with rtnl_lock held, so
just move it outside the critical section.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/main.c