diff options
author | David Howells <dhowells@redhat.com> | 2022-03-11 13:24:29 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-16 14:26:51 +0100 |
commit | d7e05190cdefc4be775f783316681e69594294b0 (patch) | |
tree | 661a62b17de72657bd927fa107f9ea8f333b09a2 | |
parent | 6cb5c7e1b33e5ae01c4c9fd993e1f33a817c9735 (diff) | |
download | linux-stable-d7e05190cdefc4be775f783316681e69594294b0.tar.gz linux-stable-d7e05190cdefc4be775f783316681e69594294b0.tar.bz2 linux-stable-d7e05190cdefc4be775f783316681e69594294b0.zip |
watch_queue: Free the alloc bitmap when the watch_queue is torn down
commit 7ea1a0124b6da246b5bc8c66cddaafd36acf3ecb upstream.
Free the watch_queue note allocation bitmap when the watch_queue is
destroyed.
Fixes: c73be61cede5 ("pipe: Add general notification queue support")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | kernel/watch_queue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/watch_queue.c b/kernel/watch_queue.c index 92bfa13b0258..e4d7225f539e 100644 --- a/kernel/watch_queue.c +++ b/kernel/watch_queue.c @@ -373,6 +373,7 @@ static void __put_watch_queue(struct kref *kref) for (i = 0; i < wqueue->nr_pages; i++) __free_page(wqueue->notes[i]); + bitmap_free(wqueue->notes_bitmap); wfilter = rcu_access_pointer(wqueue->filter); if (wfilter) |