svn commit: r338159 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Tue Aug 21 21:42:18 UTC 2018


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))


More information about the svn-src-head mailing list