Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2006 11:03:38 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 104242 for review
Message-ID:  <200608161103.38724.jhb@freebsd.org>
In-Reply-To: <200608161457.k7GEv1YG077040@repoman.freebsd.org>
References:  <200608161457.k7GEv1YG077040@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 16 August 2006 10:57, Roman Divacky wrote:
> http://perforce.freebsd.org/chv.cgi?CH=104242
> 
> Change 104242 by rdivacky@rdivacky_witten on 2006/08/16 14:56:54
> 
> 	Return p->p_ptr->p_pid in getppid directly instead of using 2.6 infrastructure.

You'll need to hold PROC_LOCK if not already to ensure p_pptr is valid while you dereference it.

> Affected files ...
> 
> .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#18 edit
> 
> Differences ...
> 
> ==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_misc.c#18 (text+ko) ====
> 
> @@ -1392,7 +1392,7 @@
>  		if (strlen(osrel) >= 3 && osrel[2] == '6')
>     			td->td_retval[0] = em->shared->group_pid;
>  		else
> -		   	td->td_retval[0] = pp->p_pid;
> +		   	td->td_retval[0] = p->p_pptr->p_pid;
>  	} else
>  	   	td->td_retval[0] = pp->p_pid;
>  
> 

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608161103.38724.jhb>