diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-28 21:39:14 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-08-28 21:39:14 +0300 |
commit | 2e0afa7e78c45a889954a7923642f013d6329d3a (patch) | |
tree | c2b368bb895458ecdfe4fd2d61cba426534569bf /fs/autofs | |
parent | 475d4df82719225510625b4263baa1105665f4b3 (diff) | |
parent | 17fce12e7c0a53f0bed26af231a2a98a34d34c60 (diff) | |
download | linux-2e0afa7e78c45a889954a7923642f013d6329d3a.tar.xz |
Merge tag 'v6.6-vfs.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull autofs fixes from Christian Brauner:
"This fixes a memory leak in autofs reported by syzkaller and a missing
conversion from uninterruptible to interruptible wake up when autofs
is in catatonic mode"
* tag 'v6.6-vfs.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
autofs: use wake_up() instead of wake_up_interruptible(()
autofs: fix memory leak of waitqueues in autofs_catatonic_mode
Diffstat (limited to 'fs/autofs')
-rw-r--r-- | fs/autofs/waitq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/autofs/waitq.c b/fs/autofs/waitq.c index 54c1f8b8b075..33dd4660d82f 100644 --- a/fs/autofs/waitq.c +++ b/fs/autofs/waitq.c @@ -32,8 +32,9 @@ void autofs_catatonic_mode(struct autofs_sb_info *sbi) wq->status = -ENOENT; /* Magic is gone - report failure */ kfree(wq->name.name - wq->offset); wq->name.name = NULL; - wq->wait_ctr--; - wake_up_interruptible(&wq->queue); + wake_up(&wq->queue); + if (!--wq->wait_ctr) + kfree(wq); wq = nwq; } fput(sbi->pipe); /* Close the pipe */ |