Skip to content

Commit

Permalink
watch_queue: Free the alloc bitmap when the watch_queue is torn down
Browse files Browse the repository at this point in the history
Free the watch_queue note allocation bitmap when the watch_queue is
destroyed.

Fixes: c73be61 ("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>
  • Loading branch information
David Howells authored and Linus Torvalds committed Mar 11, 2022
1 parent 3b4c037 commit 7ea1a01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/watch_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ea1a01

Please sign in to comment.