From owner-svn-src-head@freebsd.org Mon May 15 18:18:34 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72DEED6E5CC; Mon, 15 May 2017 18:18:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D07E1A53; Mon, 15 May 2017 18:18:34 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIIXRL055078; Mon, 15 May 2017 18:18:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIIXaO055077; Mon, 15 May 2017 18:18:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705151818.v4FIIXaO055077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 15 May 2017 18:18:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318307 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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, 15 May 2017 18:18:34 -0000 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 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--;