uml: fix one compile error
PATCH 1/1 uml: fix one compile error
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
---
arch/um/sys-i386/signal.c +2 -1
@@ -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 ;
Quoted 22 lines · On Thu, 16 Oct 2008 16:26:26 +0100 Am__rico Wang <[email protected]>…
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 unionSigned-off-by WANG Cong <[email protected]>---
arch/um/sys-i386/signal.c +0
-0
arch/um/sys-i386/signal.c static int copy_sc_from_user(struct pt_regs *regs, · line 186
Quoted 9 lines
arch/um/sys-i386/signal.c +2
-1@@ -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.
Quoted 28 lines · Andrew Morton
Quoted 25 lines · On Thu, 16 Oct 2008 16:26:26 +0100 Am__rico Wang <[email protected]>…
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 unionSigned-off-by WANG Cong <[email protected]>---
arch/um/sys-i386/signal.c +0
-0@@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,if (have_fpx_regs) {struct user_fxsr_struct fpx;
Quoted 8 lines
arch/um/sys-i386/signal.c static int copy_sc_from_user(struct pt_regs *regs, · line 186
Quoted 6 lines
arch/um/sys-i386/signal.c +2
-1- 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. :)
Signature · 1 line
"Sometimes the only way to stay sane is to go a little crazy."
Miklos Szeredi
Tested-byQuoted 38 lines · On Fri, 17 Oct 2008, =?utf-8?Q?Am=C3=A9rico?= Wang wrote:
Quoted 28 lines · Andrew Morton
Quoted 25 lines · On Thu, 16 Oct 2008 16:26:26 +0100 Am__rico Wang <[email protected]>…
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 unionSigned-off-by WANG Cong <[email protected]>---
arch/um/sys-i386/signal.c +0
-0@@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,if (have_fpx_regs) {struct user_fxsr_struct fpx;Quoted 8 lines
arch/um/sys-i386/signal.c static int copy_sc_from_user(struct pt_regs *regs, · line 186
Quoted 6 lines
arch/um/sys-i386/signal.c +2
-1- 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?
Quoted 1 line
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.
Miklos
Quoted 39 lines · Miklos Szeredi
Quoted 38 lines · On Fri, 17 Oct 2008, =?utf-8?Q?Am=C3=A9rico?= Wang wrote:
Quoted 36 lines · Andrew Morton
Quoted 22 lines · On Thu, 16 Oct 2008 16:26:26 +0100 Am__rico Wang <[email protected]>…
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 unionSigned-off-by WANG Cong <[email protected]>---
arch/um/sys-i386/signal.c +0
-0arch/um/sys-i386/signal.c static int copy_sc_from_user(struct pt_regs *regs, · line 186
Quoted 9 lines
arch/um/sys-i386/signal.c +2
-1@@ -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?
Quoted 7 lines
Quoted 1 line
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 <[email protected]>
Thank you! :)
Signature · 1 line
"Sometimes the only way to stay sane is to go a little crazy."