Bug in ptrace on smp systems

D.J. Barrow barrow_dj at yahoo.com
Tue Nov 16 01:06:45 EST 1999


Hi,
I found a bugs which causes gdb to go to sleep 
forever on smp systems occaisionally
in ptrace.c in the 2.2.10 kernel
( maybe you've this fixed maybe not ) 
in the sys_ptrace call you are
setting exit_code in most cases after calling
wake_up_process(child) this is incorrect as the
function sys_wait4 will get very confused on smp
systems as the process will be woken up on another
processor & deliver a new exit_code from do_signal
which this code will subsequently clear.

It also would be wise to move the clear_single_step
statement before wake_up_process in PTRACE_CONT.

For the correct treatment of exit_code look at the
intel code.

D.J.

=====


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list