Skip to content

Commit c1853fb

Browse files
dhowellstorvalds
authored andcommitted
watch_queue: Fix to release page in ->release()
When a pipe ring descriptor points to a notification message, the refcount on the backing page is incremented by the generic get function, but the release function, which marks the bitmap, doesn't drop the page ref. Fix this by calling generic_pipe_buf_release() at the end of watch_queue_pipe_buf_release(). 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>
1 parent db8facf commit c1853fb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/watch_queue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ static void watch_queue_pipe_buf_release(struct pipe_inode_info *pipe,
5454
bit += page->index;
5555

5656
set_bit(bit, wqueue->notes_bitmap);
57+
generic_pipe_buf_release(pipe, buf);
5758
}
5859

5960
// No try_steal function => no stealing

0 commit comments

Comments
 (0)