mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
ANDROID: mm: page_pinner: use put_user_page at access_remote_vm
/proc/<pid>/cmdline calls __get_user_pages_remote indirectly so close the false positive reporting by using put_user_page. Page pinned via pid 792, ts 11450624760 ns PFN 220828 Block 431 type Movable Flags 0xfffffc0080036(referenced|uptodate|lru|active|swapbacked) try_grab_page+0x144/0x160 follow_page_mask+0x4a1/0x630 __get_user_pages+0x24e/0x760 __get_user_pages_remote+0xd4/0x320 __access_remote_vm+0x110/0x390 proc_pid_cmdline_read+0x16a/0x3f0 vfs_read+0x98/0x180 ksys_read+0x5f/0xe0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Bug: 183414571 Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Minchan Kim <minchan@google.com> Change-Id: I88625af49600b82f6f96157d69988fbda455d819
This commit is contained in:
@@ -5469,7 +5469,7 @@ int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
|
||||
buf, maddr + offset, bytes);
|
||||
}
|
||||
kunmap(page);
|
||||
put_page(page);
|
||||
put_user_page(page);
|
||||
}
|
||||
len -= bytes;
|
||||
buf += bytes;
|
||||
|
||||
Reference in New Issue
Block a user