* [PATCH] mm/gup_test:fix ioctl fail for compat task
@ 2023-05-26 2:21 Haibo Li
2023-05-26 19:42 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: Haibo Li @ 2023-05-26 2:21 UTC (permalink / raw)
To: linux-kernel
Cc: Andrew Morton, Matthias Brugger, AngeloGioacchino Del Regno,
linux-mm, linux-arm-kernel, linux-mediatek, xiaoming.yu,
Haibo Li
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
Signed-off-by: Haibo Li <haibo.li@mediatek.com>
---
mm/gup_test.c | 1 +
1 file changed, 1 insertion(+)
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,
};
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm/gup_test:fix ioctl fail for compat task
2023-05-26 2:21 [PATCH] mm/gup_test:fix ioctl fail for compat task Haibo Li
@ 2023-05-26 19:42 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2023-05-26 19:42 UTC (permalink / raw)
To: Haibo Li, linux-kernel
Cc: Andrew Morton, Matthias Brugger, AngeloGioacchino Del Regno,
linux-mm, linux-arm-kernel, linux-mediatek, xiaoming.yu
On 26.05.23 04:21, Haibo Li wrote:
Nit: "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
>
> Signed-off-by: Haibo Li <haibo.li@mediatek.com>
> ---
> mm/gup_test.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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,
> };
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-26 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 2:21 [PATCH] mm/gup_test:fix ioctl fail for compat task Haibo Li
2023-05-26 19:42 ` David Hildenbrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox