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: baikal/aarch64/sdk6.1~4524^2~4 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=927e597d61c7;p=kernel.git 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: a23d9805b5b3 ("pipe: Add general notification queue support") Reported-by: Jann Horn Signed-off-by: David Howells Signed-off-by: Linus Torvalds --- diff --git a/kernel/watch_queue.c b/kernel/watch_queue.c index 9c476d2cbac03..c12267ccc70e1 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)