Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2007 20:28:46 +0200
From:      Marko Zec <zec@icir.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>, Marko Zec <zec@freebsd.org>
Subject:   Re: PERFORCE change 119231 for review
Message-ID:  <200705042028.47360.zec@icir.org>
In-Reply-To: <463B762B.1090005@elischer.org>
References:  <200705041118.l44BIdN0039418@repoman.freebsd.org> <463B762B.1090005@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 04 May 2007 20:06:35 Julian Elischer wrote:
> Marko Zec wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=119231
> >
> > Change 119231 by zec@zec_zoo on 2007/05/04 11:18:33
> >
> > 	proc0_init() is called before vi_init() during kernel
> > 	autoconfiguratino / booting, so pointers inside vimage_0 are
> > 	not yet populated at that time.  Hence, access vprocg_0
> > 	directly at that point, not through vimage_0.
> >
> > Affected files ...
> >
> > .. //depot/projects/vimage/src/sys/kern/init_main.c#8 edit
> >
> > Differences ...
> >
> > ==== //depot/projects/vimage/src/sys/kern/init_main.c#8 (text+ko)
> > ====
> >
> > @@ -443,7 +443,7 @@
> >  	p->p_ucred->cr_prison = NULL;	/* Don't jail it. */
> >  #ifdef VIMAGE
> >  	p->p_ucred->cr_vimage = p->p_ucred->cr_rvimage = &vimage_0;
> > -	vimage_0.v_procg->nprocs = 1;
> > +	vprocg_0.nprocs = 1;
> >  #endif
> >  #ifdef AUDIT
> >  	audit_proc_alloc(p);
>
> or change the order?

Yup...  In general I'm always more nervous about changing initialization 
order than introducing simple changes as above, but vi_init() doesn't 
(yet) depend on anything particular so yes this should work...  

Marko




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