aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaibo Li <[email protected]>2023-05-26 10:21:25 +0800
committerAndrew Morton <[email protected]>2023-06-12 11:31:51 -0700
commit4f572f0074b8be8a70bd150d96a749aa94c8d85f (patch)
treed7a69c6c4cc1cfc6deb46b8281730cbc1702143f
parent92c5d1b860e9581d64baca76779576c0ab0d943d (diff)
mm/gup_test: fix ioctl fail for compat task
When tools/testing/selftests/mm/gup_test.c is compiled as 32bit, then run on arm64 kernel, it reports "ioctl: Inappropriate ioctl for device". Fix it by filling compat_ioctl in gup_test_fops Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Haibo Li <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: AngeloGioacchino Del Regno <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: John Hubbard <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/gup_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/gup_test.c b/mm/gup_test.c
index 8ae7307a1bb6..c0421b786dcd 100644
--- a/mm/gup_test.c
+++ b/mm/gup_test.c
@@ -381,6 +381,7 @@ static int gup_test_release(struct inode *inode, struct file *file)
static const struct file_operations gup_test_fops = {
.open = nonseekable_open,
.unlocked_ioctl = gup_test_ioctl,
+ .compat_ioctl = compat_ptr_ioctl,
.release = gup_test_release,
};