Skip to content

Commit 4f572f0

Browse files
Haibo Liakpm00
authored andcommitted
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/20230526022125.175728-1-haibo.li@mediatek.com Signed-off-by: Haibo Li <haibo.li@mediatek.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: John Hubbard <jhubbard@nvidia.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 92c5d1b commit 4f572f0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

mm/gup_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ static int gup_test_release(struct inode *inode, struct file *file)
381381
static const struct file_operations gup_test_fops = {
382382
.open = nonseekable_open,
383383
.unlocked_ioctl = gup_test_ioctl,
384+
.compat_ioctl = compat_ptr_ioctl,
384385
.release = gup_test_release,
385386
};
386387

0 commit comments

Comments
 (0)