aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/compat.c')
-rw-r--r--ipc/compat.c8
1 files changed, 4 insertions, 4 deletions
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