projects/linux·commit 41c83aee

x86/xen: Fix a stale __get_user() reference in a comment

41c83aee · Linus Torvalds <[email protected]> · 2026-10-19 19:23:52 -10:00

The comment in set_aliased_prot() says the target address is faulted in
with __get_user(), but the code has used copy_from_kernel_nofault() for
a long time.  Make the comment say so.

Signed-off-by: Linus Torvalds <[email protected]>
Commit
41c83aee073fdf45536fa27cafcda499ad64a478
Parents
a7de2d2d

Changes

1 files changed · +3 −3

FileStatusAddDelContent
arch/x86/xen/enlighten_pv.cmodified+3−3View file

arch/x86/xen/enlighten_pv.c

View file
diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 2c64b38..c5117a7 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -475,9 +475,9 @@ static void set_aliased_prot(void *v, pgprot_t prot)
* have the same nominal mm, but if we're a kernel thread, lazy
* mm dropping could change our pgd.
*
- * Out of an abundance of caution, this uses __get_user() to fault
- * in the target address just in case there's some obscure case
- * in which the target address isn't readable.
+ * Out of an abundance of caution, this uses copy_from_kernel_nofault()
+ * to fault in the target address just in case there's some obscure
+ * case in which the target address isn't readable.
*/
preempt_disable();