PERFORCE change 125372 for review

John Baldwin jhb at freebsd.org
Wed Sep 26 08:48:19 PDT 2007


On Monday 20 August 2007 05:11:36 am Roman Divacky wrote:
> > +	PROC_LOCK(p);
> >  	outsysshm.pid = p->p_pid;
> > -	strncpy(outsysshm.progtitle, p->p_comm, MAXCOMLEN);
> > -	strncpy(outsysshm.proctitle, "\0", 1);
> > -	copyout((caddr_t) &outsysshm, (caddr_t) *addr, sizeof(struct sysshm)); 
> > +	copyout(&outsysshm, (vm_offset_t *)  p->p_usrsysshm, 
> > +			sizeof(struct sysshm));
> > +	PROC_UNLOCK(p);
> 
> I dont think you can copyout while holding proc lock.

Correct, but as per my earlier e-mail, the locking isn't needed anyway.

-- 
John Baldwin


More information about the p4-projects mailing list