[PATCH] simplify do_signal_stop() && utrace_report_jctl() interaction

Roland McGrath roland at redhat.com
Tue Jul 28 00:36:35 UTC 2009


> Assuming you agree with this change... I don't know how it should be merged.
> Probably the change in signal.c should be sent separately, but this breaks
> -mm tree.

The relevant -mm differences are just in one patch that folds finish_stop
into do_signal_stop, right?  If I can apply just that one patch to the
Linus tree (i.e. v2.6.31-rc4+) and then yours without conflicts, that does
just fine.

The signal.c change should go upstream ASAP, and that patch should also
include a change to the tracehook_notify_jctl kerneldoc so that it is
accurate about the locking et al.  (I am assuming you are confident that we
won't want to revamp do_signal_stop again differently for this later.)

> -	notify = tracehook_notify_jctl(stop_count == 0 ? CLD_STOPPED : 0,
> -				       CLD_STOPPED);
> +	notify = sig->group_stop_count == 1 ? CLD_STOPPED : 0;
> +	notify = tracehook_notify_jctl(notify, CLD_STOPPED);
>  
> +	if (sig->group_stop_count) {
> +		if (!--sig->group_stop_count)

This warrants a comment here about the first if.  The only reason it is
there is that tracehook_notify_jctl is allowed to drop and reacquire the
siglock, which makes the sig->group_stop_count = 1 logic et al beforehand
very important.


Thanks,
Roland




More information about the utrace-devel mailing list