Unverified Commit addad2cb authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9268 net: sched: sch_multiq: fix possible OOB write in multiq_tune()

parents 554b849b 275060c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt,

	qopt->bands = qdisc_dev(sch)->real_num_tx_queues;

	removed = kmalloc(sizeof(*removed) * (q->max_bands - q->bands),
	removed = kmalloc(sizeof(*removed) * (q->max_bands - qopt->bands),
			  GFP_KERNEL);
	if (!removed)
		return -ENOMEM;