Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 08:42:54 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Julian Elischer <julian@FreeBSD.org>
Cc:        <cvs-committers@FreeBSD.org>, <cvs-all@FreeBSD.org>
Subject:   Re: cvs commit: src/sys/kern kern_descrip.c
Message-ID:  <20010914082156.F14345-100000@delplex.bde.org>
In-Reply-To: <200109122026.f8CKQw489633@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mp@freebsd.org>
>
>   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




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