summaryrefslogtreecommitdiffstats
path: root/net/ethernet
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-08 13:19:03 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 18:22:26 +0100
commit20686a309aa98c518adbbd9b57cdbb1804143deb (patch)
tree4aac811e67d777d3c0015ca51312aa93b4832d35 /net/ethernet
parentdo_wait: factor out "retval != 0" checks (diff)
downloadlinux-20686a309aa98c518adbbd9b57cdbb1804143deb.tar.xz
linux-20686a309aa98c518adbbd9b57cdbb1804143deb.zip
ptrace_stop: fix racy nonstop_code setting
If the tracer is gone and we are not going to stop, ptrace_stop() sets ->exit_code = nostop_code. However, the tracer could actually clear the exit code before detaching. In that case get_signal_to_deliver() "resends" the signal which was cancelled by the debugger. For example, it is possible that a quick PTRACE_ATTACH + PTRACE_DETACH can leave the tracee in STOPPED state. Change the behaviour of ptrace_stop(). If the caller is ptrace notify(), we should always clear ->exit_code. If the caller is get_signal_to_deliver(), we should not touch it at all. To do so, change the nonstop_code parameter to "bool clear_code" and change the callers accordingly. 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 'net/ethernet')
0 files changed, 0 insertions, 0 deletions