From owner-svn-src-all@freebsd.org Thu Mar 1 00:59:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 342ADF327FA; Thu, 1 Mar 2018 00:59:54 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 990CA6EB20; Thu, 1 Mar 2018 00:59:53 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w210xoIl022626; Wed, 28 Feb 2018 16:59:50 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w210xoZ3022625; Wed, 28 Feb 2018 16:59:50 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803010059.w210xoZ3022625@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r330135 - head/sys/ufs/ffs In-Reply-To: <201803010029.w210TqF5069963@repo.freebsd.org> To: Conrad Meyer Date: Wed, 28 Feb 2018 16:59:50 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2018 00:59:54 -0000 > Author: cem > Date: Thu Mar 1 00:29:52 2018 > New Revision: 330135 > URL: https://svnweb.freebsd.org/changeset/base/330135 > > Log: > ffs: softdep_disk_write_complete: Quiesce spurious Coverity warning > > Coverity cannot determine that handle_written_indirdep() does not access > uninitialized 'sbp' when flags argument is zero. > > So, simply move the initialization slightly sooner to silence the warning. > > No functional change. I am always concerned when we modify code just to silence a warning from a static analysis tool. There use to be a pretty hard and fast rule about this: Dont do it, at most document that the tool is lacking and giving false positives. It double raises an eye brow when the change is made to silence the tool and "no function change" should be occuring. > Reported by: Coverity > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/ufs/ffs/ffs_softdep.c > > Modified: head/sys/ufs/ffs/ffs_softdep.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_softdep.c Thu Mar 1 00:05:14 2018 (r330134) > +++ head/sys/ufs/ffs/ffs_softdep.c Thu Mar 1 00:29:52 2018 (r330135) > @@ -10984,6 +10984,8 @@ softdep_disk_write_complete(bp) > if (ump == NULL) > return; > > + sbp = NULL; > + > /* > * If an error occurred while doing the write, then the data > * has not hit the disk and the dependencies cannot be processed. > @@ -11026,7 +11028,6 @@ softdep_disk_write_complete(bp) > /* > * Ump SU lock must not be released anywhere in this code segment. > */ > - sbp = NULL; > owk = NULL; > while ((wk = LIST_FIRST(&bp->b_dep)) != NULL) { > WORKLIST_REMOVE(wk); > > -- Rod Grimes rgrimes@freebsd.org