* [Patch] uml: fix one compile error
@ 2008-10-16 15:26 Américo Wang
2008-10-16 23:15 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Américo Wang @ 2008-10-16 15:26 UTC (permalink / raw)
To: LKML; +Cc: Andrew Morton, jdike
This patch fixed the following compile error:
CC arch/um/sys-i386/signal.o
/home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
function 'copy_sc_from_user':
/home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
warning: dereferencing 'void *' pointer
/home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
error: request for member '_fxsr_env' in something not a structure or
union
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: jdike@addtoit.com
---
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
index fd0c25a..1296473 100644
--- a/arch/um/sys-i386/signal.c
+++ b/arch/um/sys-i386/signal.c
@@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
if (have_fpx_regs) {
struct user_fxsr_struct fpx;
- err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
+ err = copy_from_user(&fpx,
+ &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
sizeof(struct user_fxsr_struct));
if (err)
return 1;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Patch] uml: fix one compile error
2008-10-16 15:26 [Patch] uml: fix one compile error Américo Wang
@ 2008-10-16 23:15 ` Andrew Morton
2008-10-17 12:20 ` Américo Wang
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-10-16 23:15 UTC (permalink / raw)
To: Américo Wang; +Cc: linux-kernel, jdike, stable
On Thu, 16 Oct 2008 16:26:26 +0100
Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
>
> This patch fixed the following compile error:
>
> CC arch/um/sys-i386/signal.o
> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
> function 'copy_sc_from_user':
> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
> warning: dereferencing 'void *' pointer
> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
> error: request for member '_fxsr_env' in something not a structure or
> union
>
>
> Signed-off-by: WANG Cong <wangcong@zeuux.org>
> Cc: jdike@addtoit.com
>
> ---
> diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
> index fd0c25a..1296473 100644
> --- a/arch/um/sys-i386/signal.c
> +++ b/arch/um/sys-i386/signal.c
> @@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
> if (have_fpx_regs) {
> struct user_fxsr_struct fpx;
>
> - err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
> + err = copy_from_user(&fpx,
> + &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
> sizeof(struct user_fxsr_struct));
> if (err)
> return 1;
Which kernel versions are affected by this error? 2.6.27?
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] uml: fix one compile error
2008-10-16 23:15 ` Andrew Morton
@ 2008-10-17 12:20 ` Américo Wang
2008-10-17 12:32 ` Miklos Szeredi
0 siblings, 1 reply; 5+ messages in thread
From: Américo Wang @ 2008-10-17 12:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: Américo Wang, linux-kernel, jdike, stable
On Thu, Oct 16, 2008 at 04:15:57PM -0700, Andrew Morton wrote:
>On Thu, 16 Oct 2008 16:26:26 +0100
>Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
>
>>
>> This patch fixed the following compile error:
>>
>> CC arch/um/sys-i386/signal.o
>> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
>> function 'copy_sc_from_user':
>> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
>> warning: dereferencing 'void *' pointer
>> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
>> error: request for member '_fxsr_env' in something not a structure or
>> union
>>
>>
>> Signed-off-by: WANG Cong <wangcong@zeuux.org>
>> Cc: jdike@addtoit.com
>>
>> ---
>> diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
>> index fd0c25a..1296473 100644
>> --- a/arch/um/sys-i386/signal.c
>> +++ b/arch/um/sys-i386/signal.c
>> @@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
>> if (have_fpx_regs) {
>> struct user_fxsr_struct fpx;
>>
>> - err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
>> + err = copy_from_user(&fpx,
>> + &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
>> sizeof(struct user_fxsr_struct));
>> if (err)
>> return 1;
>
>Which kernel versions are affected by this error? 2.6.27?
I haven't tried a stable version, but I will. :)
--
"Sometimes the only way to stay sane is to go a little crazy."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] uml: fix one compile error
2008-10-17 12:20 ` Américo Wang
@ 2008-10-17 12:32 ` Miklos Szeredi
2008-10-17 14:27 ` Américo Wang
0 siblings, 1 reply; 5+ messages in thread
From: Miklos Szeredi @ 2008-10-17 12:32 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: akpm, xiyou.wangcong, linux-kernel, jdike, stable
On Fri, 17 Oct 2008, =?utf-8?Q?Am=C3=A9rico?= Wang wrote:
> On Thu, Oct 16, 2008 at 04:15:57PM -0700, Andrew Morton wrote:
> >On Thu, 16 Oct 2008 16:26:26 +0100
> >Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
> >
> >>
> >> This patch fixed the following compile error:
> >>
> >> CC arch/um/sys-i386/signal.o
> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
> >> function 'copy_sc_from_user':
> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
> >> warning: dereferencing 'void *' pointer
> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
> >> error: request for member '_fxsr_env' in something not a structure or
> >> union
> >>
> >>
> >> Signed-off-by: WANG Cong <wangcong@zeuux.org>
> >> Cc: jdike@addtoit.com
> >>
> >> ---
> >> diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
> >> index fd0c25a..1296473 100644
> >> --- a/arch/um/sys-i386/signal.c
> >> +++ b/arch/um/sys-i386/signal.c
> >> @@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
> >> if (have_fpx_regs) {
> >> struct user_fxsr_struct fpx;
> >>
> >> - err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
> >> + err = copy_from_user(&fpx,
> >> + &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
> >> sizeof(struct user_fxsr_struct));
> >> if (err)
> >> return 1;
> >
> >Which kernel versions are affected by this error? 2.6.27?
>
> I haven't tried a stable version, but I will. :)
2.6.27 as UML works for me without the patch.
But it is needed for 2.6.28... thanks.
Tested-by: Miklos Szeredi <mszeredi@suse.cz>
Miklos
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch] uml: fix one compile error
2008-10-17 12:32 ` Miklos Szeredi
@ 2008-10-17 14:27 ` Américo Wang
0 siblings, 0 replies; 5+ messages in thread
From: Américo Wang @ 2008-10-17 14:27 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: xiyou.wangcong, akpm, linux-kernel, jdike, stable
On Fri, Oct 17, 2008 at 02:32:10PM +0200, Miklos Szeredi wrote:
>On Fri, 17 Oct 2008, =?utf-8?Q?Am=C3=A9rico?= Wang wrote:
>> On Thu, Oct 16, 2008 at 04:15:57PM -0700, Andrew Morton wrote:
>> >On Thu, 16 Oct 2008 16:26:26 +0100
>> >Am__rico Wang <xiyou.wangcong@gmail.com> wrote:
>> >
>> >>
>> >> This patch fixed the following compile error:
>> >>
>> >> CC arch/um/sys-i386/signal.o
>> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c: In
>> >> function 'copy_sc_from_user':
>> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
>> >> warning: dereferencing 'void *' pointer
>> >> /home/wangcong/Projects/linux-2.6/arch/um/sys-i386/signal.c:182:
>> >> error: request for member '_fxsr_env' in something not a structure or
>> >> union
>> >>
>> >>
>> >> Signed-off-by: WANG Cong <wangcong@zeuux.org>
>> >> Cc: jdike@addtoit.com
>> >>
>> >> ---
>> >> diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c
>> >> index fd0c25a..1296473 100644
>> >> --- a/arch/um/sys-i386/signal.c
>> >> +++ b/arch/um/sys-i386/signal.c
>> >> @@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
>> >> if (have_fpx_regs) {
>> >> struct user_fxsr_struct fpx;
>> >>
>> >> - err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
>> >> + err = copy_from_user(&fpx,
>> >> + &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
>> >> sizeof(struct user_fxsr_struct));
>> >> if (err)
>> >> return 1;
>> >
>> >Which kernel versions are affected by this error? 2.6.27?
>>
>> I haven't tried a stable version, but I will. :)
>
>2.6.27 as UML works for me without the patch.
>
>But it is needed for 2.6.28... thanks.
>
>Tested-by: Miklos Szeredi <mszeredi@suse.cz>
Thank you! :)
--
"Sometimes the only way to stay sane is to go a little crazy."
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-17 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 15:26 [Patch] uml: fix one compile error Américo Wang
2008-10-16 23:15 ` Andrew Morton
2008-10-17 12:20 ` Américo Wang
2008-10-17 12:32 ` Miklos Szeredi
2008-10-17 14:27 ` Américo Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).