From owner-cvs-all Thu Sep 13 15:43:30 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 37CA437B417; Thu, 13 Sep 2001 15:43:20 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id IAA06974; Fri, 14 Sep 2001 08:43:17 +1000 Date: Fri, 14 Sep 2001 08:42:54 +1000 (EST) From: Bruce Evans X-X-Sender: To: Julian Elischer Cc: , Subject: Re: cvs commit: src/sys/kern kern_descrip.c In-Reply-To: <200109122026.f8CKQw489633@freefall.freebsd.org> Message-ID: <20010914082156.F14345-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 12 Sep 2001, Julian Elischer wrote: > julian 2001/09/12 13:26:58 PDT > > Modified files: > sys/kern kern_descrip.c > Log: > If an incoming struct proc could have been NULL before, tehn don't > automatically change the code to add > > struct proc *p = td->td_proc; > > because now 'td' is probably capable of being NULL too. > I expect to see more of this kind of error during the 'weeding' > process. It's too easy to make. (junior hacker project.. look for these :-) > > Submitted by: mark Peek > > Revision Changes Path > 1.108 +6 -5 src/sys/kern/kern_descrip.c "struct proc *p = td->td_proc;" is forbidden by style(9) anyway. Initializations in declarations now tend to be not just style bugs but races, since the style bugs in the declarations aren't usually as bad as doing the locking in initializers. Matt had to move a number of initializations into the code after "mtx_lock_(&Giant)". Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message