svn commit: r212465 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace

Kostik Belousov kostikbel at gmail.com
Sat Sep 11 13:46:27 UTC 2010


On Sat, Sep 11, 2010 at 02:36:26PM +0100, Rui Paulo wrote:
> On 11 Sep 2010, at 14:23, Kostik Belousov wrote:
> 
> > On Sat, Sep 11, 2010 at 12:58:31PM +0000, Rui Paulo wrote:
> >> Author: rpaulo
> >> Date: Sat Sep 11 12:58:31 2010
> >> New Revision: 212465
> >> URL: http://svn.freebsd.org/changeset/base/212465
> >> 
> >> Log:
> >>  Avoid a LOR (sleepable after non-sleepable) in
> >>  fasttrap_tracepoint_enable().
> >> 
> >>  Sponsored by:	The FreeBSD Foundation
> >> 
> >> Modified:
> >>  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
> >> 
> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
> >> ==============================================================================
> >> --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Sat Sep 11 12:51:01 2010	(r212464)
> >> +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Sat Sep 11 12:58:31 2010	(r212465)
> >> @@ -591,7 +591,9 @@ fasttrap_tracepoint_enable(proc_t *p, fa
> >> 	 * Before we make any modifications, make sure we've imposed a barrier
> >> 	 * on the generation in which this probe was last modified.
> >> 	 */
> >> +	PROC_UNLOCK(p);
> >> 	fasttrap_mod_barrier(probe->ftp_gen);
> >> +	PROC_LOCK(p);
> >> 
> >> 	bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
> >> 
> > I suspect that you should hold the process around unlocked region.
> 
> The unlocked region in the diff ? You're saying I shouldn't unlock/lock here?
No, I am saying that you should do _PHOLD before dropping process lock.

> 
> > fasttrap_pid_enable() also does unlock, so it might be better to hold
> > the process immediately after pfind().
> 
> You mean use _PHOLD after pfind()?
Yes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100911/519f2454/attachment.pgp


More information about the svn-src-head mailing list