powerpc/crc: Include uaccess.h and others
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Apr 2025 02:26:28 +0000 (10:26 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Apr 2025 02:41:47 +0000 (10:41 +0800)
The powerpc crc code was relying on pagefault_disable from being
pulled in by random header files.

Fix this by explicitly including uaccess.h.  Also add other missing
header files to prevent similar problems in future.

Reported-by: Eric Biggers <ebiggers@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 7ba8df47810f ("asm-generic: Make simd.h more resilient")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/powerpc/lib/crc-t10dif-glue.c
arch/powerpc/lib/crc32-glue.c

index f411b0120cc55a5016783a3b962a275968ba8130..fa988e249f0103d6a053c0c12006af6044b3ec5e 100644 (file)
@@ -6,15 +6,15 @@
  * [based on crc32c-vpmsum_glue.c]
  */
 
-#include <linux/crc-t10dif.h>
+#include <asm/switch_to.h>
 #include <crypto/internal/simd.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
 #include <linux/cpufeature.h>
-#include <asm/simd.h>
-#include <asm/switch_to.h>
+#include <linux/crc-t10dif.h>
+#include <linux/jump_label.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
 
 #define VMX_ALIGN              16
 #define VMX_ALIGN_MASK         (VMX_ALIGN-1)
index dbd10f339183dea8b9df84da45eb1ddf7da65bb4..28450fe04e864a818cc34c185eb27cbe769c005f 100644 (file)
@@ -1,12 +1,13 @@
 // SPDX-License-Identifier: GPL-2.0-only
-#include <linux/crc32.h>
+#include <asm/switch_to.h>
 #include <crypto/internal/simd.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
 #include <linux/cpufeature.h>
-#include <asm/simd.h>
-#include <asm/switch_to.h>
+#include <linux/crc32.h>
+#include <linux/jump_label.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
 
 #define VMX_ALIGN              16
 #define VMX_ALIGN_MASK         (VMX_ALIGN-1)