• Larry Finger's avatar
    b43: Fix lockdep splat · 09164043
    Larry Finger authored
    In https://bugzilla.kernel.org/show_bug.cgi?id=67561, a locking dependency is reported
    when b43 is used with hostapd, and rfkill is used to kill the radio output.
    
    The lockdep splat (in part) is as follows:
    
    ======================================================
    [ INFO: possible circular locking dependency detected ]
    3.12.0 #1 Not tainted
    -------------------------------------------------------
    rfkill/10040 is trying to acquire lock:
     (rtnl_mutex){+.+.+.}, at: [<ffffffff8146f282>] rtnl_lock+0x12/0x20
    
    but task is already holding lock:
     (rfkill_global_mutex){+.+.+.}, at: [<ffffffffa04832ca>] rfkill_fop_write+0x6a/0x170 [rfkill]
    
    --snip--
    
    Chain exists of:
      rtnl_mutex --> misc_mtx --> rfkill_global_mutex
    
    The fix is to move the initialization of the hardware random number generator
    outside the code range covered by the rtnl_mutex.
    Reported-by: default avataryury <urykhy@gmail.com>
    Tested-by: default avataryury <urykhy@gmail.com>
    Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
    Cc: Stable <stable@vger.kernel.org>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    09164043
main.c 146 KB