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
commit 7ea1a01 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
David Howells authored and Greg Kroah-Hartman committed Mar 16, 2022
1 parent 880acbb commit 06ab844
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 @@ -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)
Expand Down

0 comments on commit 06ab844

Please sign in to comment.