kern/44011: [PATCH] PT_CONTINUE, PT_KILL and PT_DETACH are
broken
Mark Kettenis
kettenis at chello.nl
Sat Apr 12 10:40:21 PDT 2003
The following reply was made to PR kern/44011; it has been noted by GNATS.
From: Mark Kettenis <kettenis at chello.nl>
To: freebsd-gnats-submit at FreeBSD.org, kettenis at chello.nl
Cc:
Subject: Re: kern/44011: [PATCH] PT_CONTINUE, PT_KILL and PT_DETACH are broken
Date: Sat, 12 Apr 2003 19:37:25 +0200 (CEST)
Since the patch no longer applies cleanly, I updated it. Here's a
version against revision 1.244 of kern_sig.c. I also updated the file
at
http://members.chello.nl/~m.m.kettenis/FreeBSD/5-current/ptrace.patch
I hope somebody can look into this issue.
Mark
--- /usr/src/sys/kern/kern_sig.c.orig Sat Apr 12 04:54:46 2003
+++ /usr/src/sys/kern/kern_sig.c Sat Apr 12 18:47:41 2003
@@ -1918,7 +1918,6 @@ issignal(td)
if (SIGISEMPTY(sigpending)) /* no signal to send */
return (0);
sig = sig_ffs(&sigpending);
- prop = sigprop(sig);
_STOPEVENT(p, S_SIG, sig);
@@ -1950,14 +1949,6 @@ issignal(td)
PROC_LOCK(p);
/*
- * If the traced bit got turned off, go back up
- * to the top to rescan signals. This ensures
- * that p_sig* and ps_sigact are consistent.
- */
- if ((p->p_flag & P_TRACED) == 0)
- continue;
-
- /*
* If parent wants us to take the signal,
* then it will leave it in p->p_xstat;
* otherwise we just look for signals again.
@@ -1968,6 +1959,14 @@ issignal(td)
continue;
/*
+ * If the traced bit got turned off, go back up
+ * to the top to rescan signals. This ensures
+ * that p_sig* and ps_sigact are consistent.
+ */
+ if ((p->p_flag & P_TRACED) == 0)
+ continue;
+
+ /*
* Put the new signal into td_siglist. If the
* signal is being masked, look for other signals.
*/
@@ -1976,6 +1975,8 @@ issignal(td)
continue;
signotify(td);
}
+
+ prop = sigprop(sig);
/*
* Decide whether the signal should be returned.
More information about the freebsd-bugs
mailing list