Commit 834c7360 authored by Jann Horn's avatar Jann Horn Committed by Greg Kroah-Hartman

binder: Remove incorrect comment about vm_insert_page() behavior

vm_insert_page() does increment the page refcount, and just to be sure,
I've confirmed it by printing page_count(page[0].page_ptr) before and after
vm_insert_page(). It's 1 before, 2 afterwards, as expected.

Fixes: a145dd41 ("VM: add "vm_insert_page()" function")
Signed-off-by: default avatarJann Horn <jannh@google.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191018153946.128584-1-jannh@google.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 990be747
...@@ -267,7 +267,6 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate, ...@@ -267,7 +267,6 @@ static int binder_update_page_range(struct binder_alloc *alloc, int allocate,
alloc->pages_high = index + 1; alloc->pages_high = index + 1;
trace_binder_alloc_page_end(alloc, index); trace_binder_alloc_page_end(alloc, index);
/* vm_insert_page does not seem to increment the refcount */
} }
if (mm) { if (mm) {
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment