aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/compat.h4
-rw-r--r--ipc/compat.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 9f68e90a14ec..f2b8fe20cc8e 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -266,9 +266,9 @@ long compat_sys_shmat(int first, int second, compat_uptr_t third, int version,
266#else 266#else
267long compat_sys_semctl(int semid, int semnum, int cmd, int arg); 267long compat_sys_semctl(int semid, int semnum, int cmd, int arg);
268long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp, 268long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp,
269 size_t msgsz, int msgflg); 269 compat_ssize_t msgsz, int msgflg);
270long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, 270long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp,
271 size_t msgsz, long msgtyp, int msgflg); 271 compat_ssize_t msgsz, long msgtyp, int msgflg);
272long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg); 272long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg);
273#endif 273#endif
274long compat_sys_msgctl(int first, int second, void __user *uptr); 274long compat_sys_msgctl(int first, int second, void __user *uptr);
diff --git a/ipc/compat.c b/ipc/compat.c
index a41600f6ba52..20f92b2f2932 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -373,21 +373,21 @@ long compat_sys_semctl(int semid, int semnum, int cmd, int arg)
373} 373}
374 374
375long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp, 375long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp,
376 size_t msgsz, int msgflg) 376 compat_ssize_t msgsz, int msgflg)
377{ 377{
378 compat_long_t mtype; 378 compat_long_t mtype;
379 379
380 if (get_user(mtype, &msgp->mtype)) 380 if (get_user(mtype, &msgp->mtype))
381 return -EFAULT; 381 return -EFAULT;
382 return do_msgsnd(msqid, mtype, msgp->mtext, msgsz, msgflg); 382 return do_msgsnd(msqid, mtype, msgp->mtext, (ssize_t)msgsz, msgflg);
383} 383}
384 384
385long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, 385long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp,
386 size_t msgsz, long msgtyp, int msgflg) 386 compat_ssize_t msgsz, long msgtyp, int msgflg)
387{ 387{
388 long err, mtype; 388 long err, mtype;
389 389
390 err = do_msgrcv(msqid, &mtype, msgp->mtext, msgsz, msgtyp, msgflg); 390 err = do_msgrcv(msqid, &mtype, msgp->mtext, (ssize_t)msgsz, msgtyp, msgflg);
391 if (err < 0) 391 if (err < 0)
392 goto out; 392 goto out;
393 393