* [PATCH 2/2] w1 - call request_module with w1 master mutex unlocked
@ 2013-10-06 19:13 Hans-Frieder Vogt
0 siblings, 0 replies; only message in thread
From: Hans-Frieder Vogt @ 2013-10-06 19:13 UTC (permalink / raw)
To: zbr, gregkh; +Cc: linux-kernel
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>
---
drivers/w1/w1.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/w1/w1.c 2013-10-06 14:58:45.246528318 +0200
+++ b/drivers/w1/w1.c 2013-10-06 19:13:04.115279322 +0200
@@ -716,7 +716,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);
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-06 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-06 19:13 [PATCH 2/2] w1 - call request_module with w1 master mutex unlocked Hans-Frieder Vogt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox