patch-2.2.16 linux/arch/s390/kernel/sys_s390.c

Next file: linux/arch/s390/kernel/time.c
Previous file: linux/arch/s390/kernel/smp.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/arch/s390/kernel/sys_s390.c linux/arch/s390/kernel/sys_s390.c
@@ -115,8 +115,9 @@
  * This is really horribly ugly.
  */
 asmlinkage int sys_ipc (uint call, int first, int second, 
-                        int third, void *ptr, long fifth)
+                        int third, void *ptr)
 {
+        struct ipc_kludge tmp;
 	int ret;
 
         switch (call) {
@@ -137,9 +138,13 @@
                                    second, third);
 		break;
         case MSGRCV:
-                return sys_msgrcv (first, 
-                                   (struct msgbuf *) ptr,
-                                   second, fifth, third);
+                if (!ptr)
+                        return -EINVAL;
+                if (copy_from_user (&tmp, (struct ipc_kludge *) ptr,
+                                    sizeof (struct ipc_kludge)))
+                        return -EFAULT;
+                return sys_msgrcv (first, tmp.msgp,
+                                   second, tmp.msgtyp, third);
         case MSGGET:
                 return sys_msgget ((key_t) first, second);
         case MSGCTL:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)