Commit b9d83c98 authored by ZhangPeng's avatar ZhangPeng Committed by Ma Wupeng
Browse files

userswap: fix BUG_ON in __mcopy_atomic()

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6CAIM



--------------------------------

When the swap-in buffer contains no physical pages, the errno in
mfill_atomic_pte_nocopy() will be ENOENT. A BUG_ON error will occur
because the userswap feature does not use the struct page *page and page
is set to NULL.
To fix this issue, the errno should be changed from ENOENT to EINVAL.

Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent 2c317c48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment