summaryrefslogtreecommitdiffstats
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorNamhyung Kim2010-10-28 00:34:06 +0200
committerLinus Torvalds2010-10-28 03:03:12 +0200
commitb8ed374e202e23caaf9bd77dcadc9de6447faaa8 (patch)
treeea97fe186c7e0c0ee8cd61e0fc94dc42f635fd3b /kernel/signal.c
parentptrace: cleanup arch_ptrace() on xtensa (diff)
downloadkernel-qcow2-linux-b8ed374e202e23caaf9bd77dcadc9de6447faaa8.tar.gz
kernel-qcow2-linux-b8ed374e202e23caaf9bd77dcadc9de6447faaa8.tar.xz
kernel-qcow2-linux-b8ed374e202e23caaf9bd77dcadc9de6447faaa8.zip
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>
Diffstat (limited to 'kernel/signal.c')
-rw-r--r--kernel/signal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 919562c3d6b7..e921409b85a9 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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;