watch_queue: Free the alloc bitmap when the watch_queue is torn down

commit 7ea1a0124b upstream.

Free the watch_queue note allocation bitmap when the watch_queue is
destroyed.

Fixes: c73be61ced ("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>
This commit is contained in:
David Howells 2022-03-11 13:24:29 +00:00 коммит произвёл Greg Kroah-Hartman
Родитель d453d0e5a1
Коммит 82ff8a2243
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -373,6 +373,7 @@ static void __put_watch_queue(struct kref *kref)
for (i = 0; i < wqueue->nr_pages; i++) for (i = 0; i < wqueue->nr_pages; i++)
__free_page(wqueue->notes[i]); __free_page(wqueue->notes[i]);
bitmap_free(wqueue->notes_bitmap);
wfilter = rcu_access_pointer(wqueue->filter); wfilter = rcu_access_pointer(wqueue->filter);
if (wfilter) if (wfilter)