[PATCH] move_pages: fix 32 -> 64 bit compat function

The definition of the third parameter is a pointer to an array of virtual
addresses which give us some trouble.  The existing code calculated the
wrong address in the array since I used void to avoid having to specify a
type.

I now use the correct type "compat_uptr_t __user *" in the definition of
the function in kernel/compat.c.

However, I used __u32 in syscalls.h.  Would have to include compat.h there
in order to provide the same definition which would generate an ugly
include situation.

On both ia64 and x86_64 compat_uptr_t is u32. So this works although
parameter declarations differ.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Christoph Lameter 2006-06-23 02:03:57 -07:00 committed by Linus Torvalds
parent 1b2db9fb7a
commit 9216dfad4f
2 changed files with 3 additions and 3 deletions

View file

@ -522,7 +522,7 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
int __user *status,
int flags);
asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
void __user *pages,
__u32 __user *pages,
const int __user *nodes,
int __user *status,
int flags);