ipc/compat_sys_msgrcv: change msgtyp type from long to compat_long_t
Change the type of compat_sys_msgrcv's msgtyp parameter from long to compat_long_t, since compat user space passes only a 32 bit signed value. Let the compat wrapper do proper sign extension to 64 bit of this parameter. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
parent
c2e7c3d0ef
commit
291fdb0bce
2 changed files with 3 additions and 3 deletions
|
@ -430,9 +430,9 @@ COMPAT_SYSCALL_DEFINE4(msgsnd, int, msqid, compat_uptr_t, msgp,
|
|||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE5(msgrcv, int, msqid, compat_uptr_t, msgp,
|
||||
compat_ssize_t, msgsz, long, msgtyp, int, msgflg)
|
||||
compat_ssize_t, msgsz, compat_long_t, msgtyp, int, msgflg)
|
||||
{
|
||||
return do_msgrcv(msqid, compat_ptr(msgp), (ssize_t)msgsz, msgtyp,
|
||||
return do_msgrcv(msqid, compat_ptr(msgp), (ssize_t)msgsz, (long)msgtyp,
|
||||
msgflg, compat_do_msg_fill);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue