From: David Howells Date: Fri, 11 Mar 2022 13:24:29 +0000 (+0000) Subject: watch_queue: Free the alloc bitmap when the watch_queue is torn down X-Git-Tag: v5.10.106~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=06ab8444392acdbffb57869d6220fb6654a8c95e;p=users%2Fdwmw2%2Flinux.git 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 Signed-off-by: David Howells Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/watch_queue.c b/kernel/watch_queue.c index 258fa4ca4db46..77c804d8ef7b4 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)