mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ipc: fix compat msgrcv with negative msgtyp
Compat function takes msgtyp argument as u32 and passes it down to do_msgrcv which results in casting to long, thus the sign is lost and we get a big positive number instead. Cast the argument to signed type before passing it down. Signed-off-by: Mateusz Guzik <[email protected]> Reported-by: Gabriellla Schmidt <[email protected]> Cc: Al Viro <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Manfred Spraul <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ffa571dafb
commit
e7ca255236
1 changed files with 1 additions and 1 deletions
|
|
@ -381,7 +381,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
|||
uptr = compat_ptr(ipck.msgp);
|
||||
fifth = ipck.msgtyp;
|
||||
}
|
||||
return do_msgrcv(first, uptr, second, fifth, third,
|
||||
return do_msgrcv(first, uptr, second, (s32)fifth, third,
|
||||
compat_do_msg_fill);
|
||||
}
|
||||
case MSGGET:
|
||||
|
|
|
|||
Loading…
Reference in a new issue