watch_queue: free the notes array
PATCH 1/1 watch_queue: free the notes array
__put_watch_queue() frees the individual notifications but doesn't free the notes array itself causing a memory leak.
Reported by syzbot at:
https://syzkaller.appspot.com/bug?extid=25ea042ae28f3888727a
Fix by adding a kfree().
Fixes c73be61cede5 ("pipe: Add general notification queue support")
Reported-by [email protected]
Tested-by [email protected]
Signed-off-by Anirudh Rayabharam <[email protected]>
--- kernel/watch_queue.c | 1 + 1 file changed, 1 insertion(+)
kernel/watch_queue.c +1 -0
@@ -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]); +kfree (wqueue->notes);bitmap_free (wqueue->notes_bitmap); wfilter =rcu_access_pointer (wqueue->filter);
Signature · 1 line
2.35.1