threads/180496: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Sat Jul 13 19:40:01 UTC 2013


The following reply was made to PR threads/180496; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: threads/180496: commit references a PR
Date: Sat, 13 Jul 2013 19:33:03 +0000 (UTC)

 Author: kib
 Date: Sat Jul 13 19:32:50 2013
 New Revision: 253325
 URL: http://svnweb.freebsd.org/changeset/base/253325
 
 Log:
   Allow to call clock_gettime() on the clock id for zombie process.
   
   Reported by:	Petr Salinger <Petr.Salinger at seznam.cz>
   PR:	threads/180496
   Sponsored by:	The FreeBSD Foundation
 
 Modified:
   head/sys/kern/kern_time.c
 
 Modified: head/sys/kern/kern_time.c
 ==============================================================================
 --- head/sys/kern/kern_time.c	Sat Jul 13 18:09:42 2013	(r253324)
 +++ head/sys/kern/kern_time.c	Sat Jul 13 19:32:50 2013	(r253325)
 @@ -297,14 +297,9 @@ get_cputime(struct thread *td, clockid_t
  		PROC_UNLOCK(td2->td_proc);
  	} else {
  		pid = clock_id & CPUCLOCK_ID_MASK;
 -		p2 = pfind(pid);
 -		if (p2 == NULL)
 -			return (EINVAL);
 -		error = p_cansee(td, p2);
 -		if (error) {
 -			PROC_UNLOCK(p2);
 +		error = pget(pid, PGET_CANSEE, &p2);
 +		if (error != 0)
  			return (EINVAL);
 -		}
  		get_process_cputime(p2, ats);
  		PROC_UNLOCK(p2);
  	}
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-threads mailing list