]> git.baikalelectronics.ru Git - kernel.git/commitdiff
watch_queue: Free the alloc bitmap when the watch_queue is torn down
authorDavid Howells <dhowells@redhat.com>
Fri, 11 Mar 2022 13:24:29 +0000 (13:24 +0000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Mar 2022 18:17:13 +0000 (10:17 -0800)
Free the watch_queue note allocation bitmap when the watch_queue is
destroyed.

Fixes: 175295c8c9fa ("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>
kernel/watch_queue.c

index 9c476d2cbac03948a6141c042607b2bd3ad899de..c12267ccc70e1f30982d4fd8977b7118dfb25761 100644 (file)
@@ -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)