Skip to content

Commit 25f54d0

Browse files
raven-auAl Viro
authored andcommitted
autofs: fix wait name hash calculation in autofs_wait()
There's a mistake in commit 2be7828 ("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: 2be7828 ("get rid of autofs_getpath()") Cc: [email protected] Signed-off-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 519d819 commit 25f54d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/autofs/waitq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int autofs_wait(struct autofs_sb_info *sbi,
358358
qstr.len = strlen(p);
359359
offset = p - name;
360360
}
361-
qstr.hash = full_name_hash(dentry, name, qstr.len);
361+
qstr.hash = full_name_hash(dentry, qstr.name, qstr.len);
362362

363363
if (mutex_lock_interruptible(&sbi->wq_mutex)) {
364364
kfree(name);

0 commit comments

Comments
 (0)