diff options
author | Pavel Roskin <proski@gnu.org> | 2007-06-02 14:00:18 -0400 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-06-03 18:38:22 +0200 |
commit | 2830c34666a96eb97c006cdf3a3a23ca7c142f8c (patch) | |
tree | 61b0e15eac5398a24f403162a83220b0524f839b | |
parent | f7fbfb7a42b1a150c2d3860ebd837a3785566a62 (diff) |
[PATCH] Release priv->mtx when registering network device
Not doing so causes circular mutex dependency, which is detected by the
kernel lock validation code The driver's mutex should only protect
hardware access and driver's structures, and should not be held when
dealing with higher layers of the kernel.
The locking and the initialization may need a serious overhaul, but this
little change is a step in the right direction.
Signed-off-by: Pavel Roskin <proski@gnu.org>
-rw-r--r-- | at76_usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4296,8 +4296,10 @@ static void at76_work_external_fw(struct work_struct *work) } } priv->istate = INIT; + mutex_unlock(&priv->mtx); if ((ret = at76_init_new_device(priv)) < 0) err("Downloading external firmware failed: %d", ret); + return; end_external_fw: mutex_unlock(&priv->mtx); |