Skip to content
Commit fbb77611 authored by Dmitry V. Levin's avatar Dmitry V. Levin Committed by Linus Torvalds
Browse files

Fix compat_sys_sigpending breakage



The latest change of compat_sys_sigpending in commit 8f13621a
("sigpending(): move compat to native") has broken it in two ways.

First, it tries to write 4 bytes more than userspace expects:
sizeof(old_sigset_t) == sizeof(long) == 8 instead of
sizeof(compat_old_sigset_t) == sizeof(u32) == 4.

Second, on big endian architectures these bytes are being written in the
wrong order.

This bug was found by strace test suite.

Reported-by: default avatarAnatoly Pugachev <matorola@gmail.com>
Inspired-by: default avatarEugene Syromyatnikov <evgsyr@gmail.com>
Fixes: 8f13621a ("sigpending(): move compat to native")
Signed-off-by: default avatarDmitry V. Levin <ldv@altlinux.org>
Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0fdd951c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment