• Frederic Weisbecker's avatar
    posix-timers: Use sighand lock instead of tasklist_lock on timer deletion · 3d7a1427
    Frederic Weisbecker authored
    Timer deletion doesn't need the tasklist lock.
    We need to protect against:
    
    * concurrent access to the lists p->cputime_expires and
      p->sighand->cputime_expires
    
    * task reaping that may also delete the timer list entry
    
    * timer firing
    
    We already hold the timer lock which protects us against concurrent
    timer firing.
    
    The rest only need the targets sighand to be locked.
    So hold it and drop the use of tasklist_lock there.
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    3d7a1427
posix-cpu-timers.c 37.9 KB