mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
signals: annotate lock_task_sighand()
lock_task_sighand() grabs sighand->siglock in case of returning non-NULL but unlock_task_sighand() releases it unconditionally. This leads sparse to complain about the lock context imbalance. Rename and wrap lock_task_sighand() using __cond_lock() macro to make sparse happy. Suggested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5ef45079dd
commit
b8ed374e20
2 changed files with 10 additions and 2 deletions
|
@ -1105,7 +1105,8 @@ int zap_other_threads(struct task_struct *p)
|
|||
return count;
|
||||
}
|
||||
|
||||
struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags)
|
||||
struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
|
||||
unsigned long *flags)
|
||||
{
|
||||
struct sighand_struct *sighand;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue