Skip to content
Commit 03b9a6e1 authored by Zhao Liu's avatar Zhao Liu Committed by Wei Liu
Browse files

x86/hyperv: Remove BUG_ON() for kmap_local_page()

The commit 154fb14d

 ("x86/hyperv: Replace kmap() with
kmap_local_page()") keeps the BUG_ON() to check if kmap_local_page()
fails.

But in fact, kmap_local_page() always returns a valid kernel address
and won't return NULL here. It will BUG on its own if it fails. [1]

So directly use memcpy_to_page() which creates local mapping to copy.

[1]: https://lore.kernel.org/lkml/YztFEyUA48et0yTt@iweiny-mobl/

Suggested-by: default avatarFabio M. De Francesco <fmdefrancesco@gmail.com>
Suggested-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarZhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20221020083820.2341088-1-zhao1.liu@linux.intel.com
Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 247f34f7
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