Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 May 2017 18:18:33 +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: r318307 - head/sys/dev/cxgbe
Message-ID:  <201705151818.v4FIIXaO055077@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon May 15 18:18:32 2017
New Revision: 318307
URL: https://svnweb.freebsd.org/changeset/base/318307

Log:
  cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx
  queue from a traffic class fails.
  
  Reported by:	x ksi <s3810 at pjwstk edu pl>
  MFC after:	3 days

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

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Mon May 15 18:07:57 2017	(r318306)
+++ head/sys/dev/cxgbe/t4_sge.c	Mon May 15 18:18:32 2017	(r318307)
@@ -5323,7 +5323,7 @@ sysctl_tc(SYSCTL_HANDLER_ARGS)
 			tc->refcount--;
 		}
 		txq->tc_idx = tc_idx;
-	} else {
+	} else if (tc_idx != -1) {
 		tc = &pi->sched_params->cl_rl[tc_idx];
 		MPASS(tc->refcount > 0);
 		tc->refcount--;



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