mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
92c5d1b860
commit
4f572f0074
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user