Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 21:42:18 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r338159 - head/sys/dev/cxgbe
Message-ID:  <201808212142.w7LLgIog089015@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Aug 21 21:42:17 2018
New Revision: 338159
URL: https://svnweb.freebsd.org/changeset/base/338159

Log:
  cxgbe(4): Make it clear that VI_INIT_DONE implies vi->ntxq > 0, and so
  rc will never be returned uninitialized.
  
  Reported by:	Coverity (CID 1394884).  This is a false positive though.
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_sched.c

Modified: head/sys/dev/cxgbe/t4_sched.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sched.c	Tue Aug 21 21:32:51 2018	(r338158)
+++ head/sys/dev/cxgbe/t4_sched.c	Tue Aug 21 21:42:17 2018	(r338159)
@@ -394,6 +394,7 @@ t4_set_sched_queue(struct adapter *sc, struct t4_sched
 	/* Checking VI_INIT_DONE outside a synch-op is a harmless race here. */
 	if (!(vi->flags & VI_INIT_DONE))
 		return (EAGAIN);
+	MPASS(vi->ntxq > 0);
 
 	if (!in_range(p->queue, 0, vi->ntxq - 1) ||
 	    !in_range(p->cl, 0, sc->chip_params->nsched_cls - 1))



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