[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1lPfphHVRn2e4I5@liuwe-devbox-debian-v2>
Date: Wed, 26 Oct 2022 15:17:18 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Zhao Liu <zhao1.liu@...ux.intel.com>
Cc: "K . Y . Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H . Peter Anvin" <hpa@...or.com>, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, Ira Weiny <ira.weiny@...el.com>,
"Fabio M . De Francesco" <fmdefrancesco@...il.com>,
Zhenyu Wang <zhenyu.z.wang@...el.com>,
Zhao Liu <zhao1.liu@...el.com>
Subject: Re: [PATCH v2] x86/hyperv: Remove BUG_ON() for kmap_local_page()
On Thu, Oct 20, 2022 at 04:38:20PM +0800, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@...el.com>
>
> The commit 154fb14df7a3c ("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: Fabio M. De Francesco <fmdefrancesco@...il.com>
> Suggested-by: Ira Weiny <ira.weiny@...el.com>
> Reviewed-by: Ira Weiny <ira.weiny@...el.com>
> Signed-off-by: Zhao Liu <zhao1.liu@...el.com>
Applied to hyperv-fixes. Thanks.
Powered by blists - more mailing lists