2020-07-14 06:08:50

by Guoyun Sun

[permalink] [raw]
Subject: [PATCH] MIPS: fix vdso different address spaces

From: Sunguoyun <[email protected]>

sparse report build warning as follows:
arch/mips/vdso/vdso-n32-image.c:13:35:
incorrect type in assignment (different address spaces) @@
expected void *[usertype] vdso @@ got void [noderef] <asn:1> * @@

Reported-by: kernel test robot <[email protected]>

Signed-off-by: Sunguoyun <[email protected]>
---
arch/mips/vdso/genvdso.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/vdso/genvdso.c b/arch/mips/vdso/genvdso.c
index be57b832bbe0..94f9538bc889 100644
--- a/arch/mips/vdso/genvdso.c
+++ b/arch/mips/vdso/genvdso.c
@@ -260,7 +260,7 @@ int main(int argc, char **argv)
fprintf(out_file, " if (vdso_image.size != new_size)\n");
fprintf(out_file, " return -EINVAL;\n");
fprintf(out_file, " current->mm->context.vdso =\n");
- fprintf(out_file, " (void __user *)(new_vma->vm_start);\n");
+ fprintf(out_file, " (void *)(new_vma->vm_start);\n");
fprintf(out_file, " return 0;\n");
fprintf(out_file, "}\n");

--
2.17.1


2020-07-16 10:02:40

by Thomas Bogendoerfer

[permalink] [raw]
Subject: Re: [PATCH] MIPS: fix vdso different address spaces

On Tue, Jul 14, 2020 at 02:07:47PM +0800, Guoyun Sun wrote:
> From: Sunguoyun <[email protected]>
>
> sparse report build warning as follows:
> arch/mips/vdso/vdso-n32-image.c:13:35:
> incorrect type in assignment (different address spaces) @@
> expected void *[usertype] vdso @@ got void [noderef] <asn:1> * @@
>
> Reported-by: kernel test robot <[email protected]>
>
> Signed-off-by: Sunguoyun <[email protected]>
> ---
> arch/mips/vdso/genvdso.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]