diff options
author | Hans-Frieder Vogt <hfvogt@gmx.net> | 2013-10-06 21:13:40 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-04 04:35:20 -0800 |
commit | 832307cb856d0e02740f255d90c29e31fba47606 (patch) | |
tree | 70e360bfc8b6b85ad3750701d3df8bdae7083d5f | |
parent | 7c0c220dc74fbc153c5c5c8383169c0915d22286 (diff) | |
download | lwn-832307cb856d0e02740f255d90c29e31fba47606.tar.gz lwn-832307cb856d0e02740f255d90c29e31fba47606.zip |
w1 - call request_module with w1 master mutex unlocked
commit bc04d76d6942068f75c10790072280b847ec6f1f upstream.
request_module for w1 slave modules needs to be called with the w1
master mutex unlocked. Because w1_attach_slave_device gets always(?)
called with mutex locked, we need to temporarily unlock the w1 master
mutex for the loading of the w1 slave module.
Signed-off by: Hans-Frieder Vogt <hfvogt@gmx.net>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/w1/w1.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 0459df843c58..15a6ddf7f3ca 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -680,7 +680,10 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) atomic_set(&sl->refcnt, 0); init_completion(&sl->released); + /* slave modules need to be loaded in a context with unlocked mutex */ + mutex_unlock(&dev->mutex); request_module("w1-family-0x%0x", rn->family); + mutex_lock(&dev->mutex); spin_lock(&w1_flock); f = w1_family_registered(rn->family); |