lkml.org 
[lkml]   [2013]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3.11 60/66] w1 - call request_module with w1 master mutex unlocked
Date
3.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hans-Frieder Vogt <hfvogt@gmx.net>

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>

---
drivers/w1/w1.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -680,7 +680,10 @@ static int w1_attach_slave_device(struct
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);



\
 
 \ /
  Last update: 2013-11-02 00:41    [W:0.232 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site