hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IDB21A -------------------------------- We should judge the non-mapping pages case, and it will cause bad rss-counter state. BUG: Bad rss-counter state mm:00000000a116619e type:MM_ANONPAGES val:32768 Fixes: 8d543a8e74d5 ("zcopy: Introduce the pageattach interface") Signed-off-by: Liu Mingrui <liumingrui@huawei.com> --- drivers/misc/zcopy/zcopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/zcopy/zcopy.c b/drivers/misc/zcopy/zcopy.c index 74ca46814597..f4c56ce07e66 100644 --- a/drivers/misc/zcopy/zcopy.c +++ b/drivers/misc/zcopy/zcopy.c @@ -641,7 +641,7 @@ static int attach_pages(unsigned long dst_addr, unsigned long src_addr, struct task_struct *src_task, *dst_task; struct page **process_pages; unsigned long nr_pages; - unsigned int flags = 0; + unsigned int flags = FOLL_NOFAULT; int pinned_pages; int locked = 1; int ret; -- 2.25.1