Commit c1bf5440 authored by Min Fanlei's avatar Min Fanlei Committed by guzitao
Browse files

sw64: kvm: fix incorrect page_ref_count() call

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56WV8



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

The last page_ref_count() call will cause kernel panic if
kvm memory pool is at the end of DRAM. This patch reorders
the checks to avoid illegal atomic_read operation.

Signed-off-by: default avatarMin Fanlei <minfanlei@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent aadce492
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment