summaryrefslogtreecommitdiffstats
path: root/kernel/watch_queue.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-03-11 14:24:29 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-11 19:17:13 +0100
commit7ea1a0124b6da246b5bc8c66cddaafd36acf3ecb (patch)
tree4fad9cea9259df10da75c44d4788a62d920ba661 /kernel/watch_queue.c
parentwatch_queue: Fix the alloc bitmap size to reflect notes allocated (diff)
downloadlinux-7ea1a0124b6da246b5bc8c66cddaafd36acf3ecb.tar.xz
linux-7ea1a0124b6da246b5bc8c66cddaafd36acf3ecb.zip
watch_queue: Free the alloc bitmap when the watch_queue is torn down
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>
Diffstat (limited to 'kernel/watch_queue.c')
-rw-r--r--kernel/watch_queue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/watch_queue.c b/kernel/watch_queue.c
index 9c476d2cbac0..c12267ccc70e 100644
--- a/kernel/watch_queue.c
+++ b/kernel/watch_queue.c
@@ -370,6 +370,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)