• Oleg Nesterov's avatar
    posix timers: sigqueue_free: don't free sigqueue if it is queued · c8e85b4f
    Oleg Nesterov authored
    Currently sigqueue_free() removes sigqueue from list, but doesn't cancel the
    pending signal. This is not consistent, the task should either receive the
    "full" signal along with siginfo_t, or it shouldn't receive the signal at all.
    
    Change sigqueue_free() to clear SIGQUEUE_PREALLOC but leave sigqueue on list
    if it is queued.
    
    This is a user-visible change. If the signal is blocked, it stays queued
    after sys_timer_delete() until unblocked with the "stale" si_code/si_value,
    and of course it is still counted wrt RLIMIT_SIGPENDING which also limits
    the number of posix timers.
    Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
    Cc: Austin Clements <amdragon+kernelbugzilla@mit.edu>
    Cc: Roland McGrath <roland@redhat.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c8e85b4f
signal.c 63.5 KB