From: Bodo Stroesser <[email protected]>
In arch/um/kernel/skas/uaccess.c, the simple assignment
va_list args = *((va_list *) arg_ptr);
is used in do_buffer_op() to obtain a copy of a va_list, that
was delivered as a pointer only.
But this construction doesn't compile on s390. Instead,
va_copy() and va_end() should be used (see "man va_start").
Signed-off-by: Bodo Stroesser <[email protected]>
Signed-off-by: Jeff Dike <[email protected]>
Index: 2.6.10/arch/um/kernel/skas/uaccess.c
===================================================================
--- 2.6.10.orig/arch/um/kernel/skas/uaccess.c 2005-01-03 12:56:15.000000000 -0500
+++ 2.6.10/arch/um/kernel/skas/uaccess.c 2005-01-03 12:57:59.000000000 -0500
@@ -54,15 +54,23 @@
static void do_buffer_op(void *jmpbuf, void *arg_ptr)
{
- va_list args = *((va_list *) arg_ptr);
- unsigned long addr = va_arg(args, unsigned long);
- int len = va_arg(args, int);
- int is_write = va_arg(args, int);
- int (*op)(unsigned long, int, void *) = va_arg(args, void *);
- void *arg = va_arg(args, void *);
- int *res = va_arg(args, int *);
- int size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len);
- int remain = len, n;
+ va_list args;
+ unsigned long addr;
+ int len, is_write, size, remain, n;
+ int (*op)(unsigned long, int, void *);
+ void *arg;
+ int *res;
+
+ va_copy(args, *(va_list *)arg_ptr);
+ addr = va_arg(args, unsigned long);
+ len = va_arg(args, int);
+ is_write = va_arg(args, int);
+ op = va_arg(args, void *);
+ arg = va_arg(args, void *);
+ res = va_arg(args, int *);
+ va_end(args);
+ size = min(PAGE_ALIGN(addr) - addr, (unsigned long) len);
+ remain = len;
current->thread.fault_catcher = jmpbuf;
n = do_op(addr, size, is_write, op, arg);