]> git.baikalelectronics.ru Git - kernel.git/commit
autofs: fix wait name hash calculation in autofs_wait()
authorIan Kent <raven@themaw.net>
Thu, 23 Sep 2021 07:13:39 +0000 (15:13 +0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Oct 2021 01:09:02 +0000 (21:09 -0400)
commit831268506c9dfd6b1ccc10102851b2c6a0238665
tree340bf52fa85e5abca680b3b978cf22b899fa2a55
parent485bd5475dab204d9d634b832666b112ba096f53
autofs: fix wait name hash calculation in autofs_wait()

There's a mistake in commit a91175a91a5fd ("get rid of autofs_getpath()")
that affects kernels from v5.13.0, basically missed because of me not
fully testing the change for Al.

The problem is that the hash calculation for the wait name qstr hasn't
been updated to account for the change to use dentry_path_raw(). This
prevents the correct matching an existing wait resulting in multiple
notifications being sent to the daemon for the same mount which must
not occur.

The problem wasn't discovered earlier because it only occurs when
multiple processes trigger a request for the same mount concurrently
so it only shows up in more aggressive testing.

Fixes: a91175a91a5fd ("get rid of autofs_getpath()")
Cc: stable@vger.kernel.org
Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/autofs/waitq.c