summaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-05-23 22:04:41 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-24 18:56:10 +0200
commitda7978b0348d497688541e2d2f5739aa2a2c334f (patch)
treef4f55bf4293ff203f598e7a57959da1c5a7ad295 /kernel/hrtimer.c
parentmd: restart recovery cleanly after device failure. (diff)
downloadlinux-da7978b0348d497688541e2d2f5739aa2a2c334f.tar.xz
linux-da7978b0348d497688541e2d2f5739aa2a2c334f.zip
signals: fix sigqueue_free() vs __exit_signal() race
__exit_signal() does flush_sigqueue(tsk->pending) outside of ->siglock. This can race with another thread doing sigqueue_free(), we can free the same SIGQUEUE_PREALLOC sigqueue twice or corrupt the pending->list. Note that even sys_exit_group() can trigger this race, not only sys_timer_delete(). Move the callsite of flush_sigqueue(tsk->pending) under ->siglock. This patch doesn't touch flush_sigqueue(->shared_pending) below, it is called when there are no other threads which can play with signals, and sigqueue_free() can't be used outside of our thread group. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: 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/hrtimer.c')
0 files changed, 0 insertions, 0 deletions