This is a note to let you know that I've just added the patch titled b43: Fix lockdep splat to the 3.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: b43-fix-lockdep-splat.patch and it can be found in the queue-3.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 09164043f63c947a49797750a09ca1cd7c31108e Mon Sep 17 00:00:00 2001 From: Larry Finger <Larry.Finger@xxxxxxxxxxxx> Date: Sun, 12 Jan 2014 15:11:37 -0600 Subject: b43: Fix lockdep splat From: Larry Finger <Larry.Finger@xxxxxxxxxxxx> commit 09164043f63c947a49797750a09ca1cd7c31108e upstream. 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: yury <urykhy@xxxxxxxxx> Tested-by: yury <urykhy@xxxxxxxxx> Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/wireless/b43/main.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c @@ -2424,6 +2424,7 @@ error: static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl); static void b43_one_core_detach(struct b43_bus_dev *dev); +static int b43_rng_init(struct b43_wl *wl); static void b43_request_firmware(struct work_struct *work) { @@ -2475,6 +2476,10 @@ start_ieee80211: goto err_one_core_detach; wl->hw_registred = true; b43_leds_register(wl->current_dev); + + /* Register HW RNG driver */ + b43_rng_init(wl); + goto out; err_one_core_detach: @@ -4636,9 +4641,6 @@ static void b43_wireless_core_exit(struc if (!dev || b43_status(dev) != B43_STAT_INITIALIZED) return; - /* Unregister HW RNG driver */ - b43_rng_exit(dev->wl); - b43_set_status(dev, B43_STAT_UNINIT); /* Stop the microcode PSM. */ @@ -4795,9 +4797,6 @@ static int b43_wireless_core_init(struct b43_set_status(dev, B43_STAT_INITIALIZED); - /* Register HW RNG driver */ - b43_rng_init(dev->wl); - out: return err; @@ -5464,6 +5463,9 @@ static void b43_bcma_remove(struct bcma_ b43_one_core_detach(wldev->dev); + /* Unregister HW RNG driver */ + b43_rng_exit(wl); + b43_leds_unregister(wl); ieee80211_free_hw(wl->hw); @@ -5541,6 +5543,9 @@ static void b43_ssb_remove(struct ssb_de b43_one_core_detach(dev); + /* Unregister HW RNG driver */ + b43_rng_exit(wl); + if (list_empty(&wl->devlist)) { b43_leds_unregister(wl); /* Last core on the chip unregistered. Patches currently in stable-queue which might be from Larry.Finger@xxxxxxxxxxxx are queue-3.13/b43-fix-lockdep-splat.patch queue-3.13/staging-r8712u-set-device-type-to-wlan.patch queue-3.13/rtlwifi-redo-register-save-locations.patch queue-3.13/rtlwifi-rtl8192cu-add-new-device-id.patch queue-3.13/rtlwifi-rtl8192c-add-new-definitions-in-the-dm_common-header.patch queue-3.13/rtlwifi-rtl8192c-update-dynamic-gain-calculations.patch queue-3.13/b43-fix-the-wrong-assignment-of-status.freq-in-b43_rx.patch queue-3.13/b43-fix-unload-oops-if-firmware-is-not-available.patch queue-3.13/rtlwifi-rtl8192cu-add-new-firmware.patch queue-3.13/b43legacy-fix-unload-oops-if-firmware-is-not-available.patch queue-3.13/rtlwifi-rtl8192cu-fix-some-code-in-rf-handling.patch queue-3.13/rtlwifi-set-the-link-state.patch queue-3.13/rtlwifi-increase-the-rx-queue-length-for-usb-drivers.patch queue-3.13/rtlwifi-rtl8192c-add-routines-to-save-restore-power-index-registers.patch queue-3.13/rtlwifi-rtl8192c-prevent-reconnect-attempts-if-not-connected.patch queue-3.13/rtlwifi-rtl8188ee-fix-typo-in-code.patch queue-3.13/rtlwifi-rtl8192cu-update-the-power-index-registers.patch queue-3.13/rtlwifi-add-missing-code-to-pwdb-statics-routine.patch queue-3.13/rtlwifi-update-beacon-statistics-for-usb-driver.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html