• O
    posix-cpu-timers: avoid "task->signal != NULL" checks · d30fda35
    Oleg Nesterov 提交于
    Preparation to make task->signal immutable, no functional changes.
    
    posix-cpu-timers.c checks task->signal != NULL to ensure this task is
    alive and didn't pass __exit_signal().  This is correct but we are going
    to change the lifetime rules for ->signal and never reset this pointer.
    
    Change the code to check ->sighand instead, it doesn't matter which
    pointer we check under tasklist, they both are cleared simultaneously.
    
    As Roland pointed out, some of these changes are not strictly needed and
    probably it makes sense to revert them later, when ->signal will be pinned
    to task_struct.  But this patch tries to ensure the subsequent changes in
    fork/exit can't make any visible impact on posix cpu timers.
    Signed-off-by: NOleg Nesterov <oleg@redhat.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Acked-by: NRoland McGrath <roland@redhat.com>
    Cc: Stanislaw Gruszka <sgruszka@redhat.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    d30fda35
posix-cpu-timers.c 42.7 KB