Skip to content

Commit 99f40fe

Browse files
committed
Merge pull request #407 from aeickho/backport-fix-drivers_w1_w1.c
w1 - call request_module with w1 master mutex unlocked
2 parents 678f323 + 40a16fe commit 99f40fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/w1/w1.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,10 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
680680
atomic_set(&sl->refcnt, 0);
681681
init_completion(&sl->released);
682682

683+
/* slave modules need to be loaded in a context with unlocked mutex */
684+
mutex_unlock(&dev->mutex);
683685
request_module("w1-family-0x%0x", rn->family);
686+
mutex_lock(&dev->mutex);
684687

685688
spin_lock(&w1_flock);
686689
f = w1_family_registered(rn->family);

0 commit comments

Comments
 (0)