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
This commit is contained in:
Navdeep Parhar 2017-05-15 18:18:32 +00:00
parent 0af1da97ee
commit 3f1466a535
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=318307

View File

@ -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--;