From owner-svn-src-head@FreeBSD.ORG Mon Nov 17 18:27:46 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB6751065670; Mon, 17 Nov 2008 18:27:46 +0000 (UTC) (envelope-from philip@paeps.cx) Received: from gateway.nixsys.be (gateway.nixsys.be [IPv6:2001:6f8:32f::42]) by mx1.freebsd.org (Postfix) with ESMTP id 9613C8FC08; Mon, 17 Nov 2008 18:27:46 +0000 (UTC) (envelope-from philip@paeps.cx) Received: from detritus.paeps.cx (detritus.paeps.cx [IPv6:2001:6f8:1408::4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "detritus.paeps.cx", Issuer "CAcert Class 3 Root" (verified OK)) by gateway.nixsys.be (Postfix) with ESMTPS id E2F254056; Mon, 17 Nov 2008 19:27:45 +0100 (CET) Received: by detritus.paeps.cx (Postfix, from userid 1001) id 63B9720C8; Mon, 17 Nov 2008 19:27:44 +0100 (CET) Date: Mon, 17 Nov 2008 10:27:44 -0800 From: Philip Paeps To: Pawel Jakub Dawidek Message-ID: <20081117182744.GN17340@detritus.paeps.cx> Mail-Followup-To: Pawel Jakub Dawidek , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200811170709.mAH79ecr075977@svn.freebsd.org> <20081117165006.GA1489@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20081117165006.GA1489@garage.freebsd.pl> X-PGP-Fingerprint: 356B AE02 4763 F739 2FA2 E438 2649 E628 C5D3 4D05 X-Date: Today is Sweetmorn, the 29th day of The Aftermath in the YOLD 3174 X-Phase-of-Moon: The Moon is Waning Gibbous (74% of Full) X-Message-Flag: Get a proper mailclient! Organization: Happily Disorganized User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185021 - head/sys/dev/glxsb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2008 18:27:47 -0000 On 2008-11-17 17:51:52 (+0100), Pawel Jakub Dawidek wrote: > On Mon, Nov 17, 2008 at 07:09:40AM +0000, Philip Paeps wrote: > > Fix two possible (but unlikely) NULL-pointer dereferences in glxsb(4). > > > > [...] > > > > - while ((ses = TAILQ_FIRST(&sc->sc_sessions)) != NULL) { > > + while (!TAILQ_EMPTY(&sc->sc_sessions)) { > > + ses = TAILQ_FIRST(&sc->sc_sessions); > > This is perfectly valid, and if it was reported by coverity, it is a > false positive. True. Sorry for the noise. Reminds me to find a way to get Coverity not to complain about this. > > - if (crp == NULL || > > - crp->crp_callback == NULL || crp->crp_desc == NULL) { > > + /* Sanity check. */ > > + if (crp == NULL) > > + return (EINVAL); > > + > > + if (crp->crp_callback == NULL || crp->crp_desc == NULL) { > > error = EINVAL; > > goto fail; > > } > > This one is ok. The same one exists in padlock(4), could you fix it too? Will do. Thanks. - Philip -- Philip Paeps Please don't Cc me, I am philip@freebsd.org subscribed to the list. The worse your line is tangled, the better is the fishing around you.