]> git.baikalelectronics.ru Git - kernel.git/commit
autofs4: close the races around autofs4_notify_daemon()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Sep 2013 21:32:12 +0000 (17:32 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 16 Sep 2013 23:16:38 +0000 (19:16 -0400)
commitfe675fe8d8f8a2b993bed9f8f2c73d44a2fe5993
tree43958ffa5278f8ba9d1d6a8884087b196952e94a
parent10342fa3dbff261d355e7cc352c0fbba69170f60
autofs4: close the races around autofs4_notify_daemon()

Don't drop ->wq_mutex before calling autofs4_notify_daemon() only to regain it
there.  Besides being pointless, that opens a race window where autofs4_wait_release()
could've come and freed wq->name.name.  And do the debugging printk in the "reused an
existing wq" case before dropping ->wq_mutex - the same reason...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Ian Kent <raven@themaw.net>
fs/autofs4/waitq.c