From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B18C043E06E; Tue, 21 Jul 2026 22:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784674568; cv=none; b=f6Am+GhVM7IIsc1S8nVAOtaacuEWiZG0PGtWxeguUmLnp7TE9Sy30YwqxmYC6Y3DkQaU562xB+mIUnUCnWPlmK1ZE7LehBb0C6SHeNm9d0yLmmGymG0KYDQoY3zmzlarokLn4W5nz7j/CBMGL2ShIPhbdkvRNFAIZupgDYskcek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784674568; c=relaxed/simple; bh=OoNAalVQvgaFtrHmiP/CG9Npcz7hAckxjeP5bf/lc9w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HGJK0dlh1COUJ3Hnsb2/T74dL59xLVHa3M6sL+xA53Rm9KredpBtiKbnAwak9BM31Z/6lCy5EJvcsgL2RzgWTXtOybs6HUVbv+ekQaquxXoAdh3FstxkxEa1R4Fo5GfszuyL46n1NXu+Es+JrUXLpLOV3+VBwm8eBd4icGQy9hU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ehiEnttC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ehiEnttC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE5E1F000E9; Tue, 21 Jul 2026 22:56:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784674567; bh=sGWDOAtJ3iJeUowqwQlzhFC7ucincxzqVWXs/+Whn4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ehiEnttCUFy/gdJ20APAKdw1e7axkyVSvvOO5mdP6zsIzRpIaGETkBqiLW7tRxCuV R+A76IxOJOtdzorbFRdAYPybEj0RObfpT6a/eKUaBggyZ7rzsukCzTOYrkUK1CpHx1 x7dS2F/HNCUvrHwyEN0JcWcZ6AbYZ50c2llcCDEk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bryam Vargas , Victor Nogueira , Jamal Hadi Salim , Jakub Kicinski Subject: [PATCH 5.10 547/699] net/sched: sch_multiq: Replace direct dequeue call with peek and qdisc_dequeue_peeked Date: Tue, 21 Jul 2026 17:25:06 +0200 Message-ID: <20260721152408.042635729@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152355.667394603@linuxfoundation.org> References: <20260721152355.667394603@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bryam Vargas commit 54f6b0c843e228d499eb4b6bbb89df68cad9ad5d upstream. multiq_dequeue() takes a packet from a band's child with a direct ->dequeue() call after multiq_peek() peeked it. When the child is non-work-conserving the peek stashes the skb in the child's gso_skb, so the direct dequeue returns a different skb and orphans the stash, desyncing the child's qlen/backlog. With a qfq child reached through a peeking parent (e.g. tbf) this re-enters the child on an emptied list and dereferences NULL, panicking the kernel from softirq on ordinary egress. Take the packet through qdisc_dequeue_peeked(), as sch_prio already does and as sch_red and sch_sfb were just fixed to do. The helper is a no-op when the child has no stash, so a work-conserving child is unaffected. Fixes: 77be155cba4e ("pkt_sched: Add peek emulation for non-work-conserving qdiscs.") Cc: stable@vger.kernel.org Signed-off-by: Bryam Vargas Reviewed-by: Victor Nogueira Acked-by: Jamal Hadi Salim Link: https://patch.msgid.link/20260625-b4-disp-31bcb279-v1-2-85c40b83c529@proton.me Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/sched/sch_multiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c @@ -103,7 +103,7 @@ static struct sk_buff *multiq_dequeue(st if (!netif_xmit_stopped( netdev_get_tx_queue(qdisc_dev(sch), q->curband))) { qdisc = q->queues[q->curband]; - skb = qdisc->dequeue(qdisc); + skb = qdisc_dequeue_peeked(qdisc); if (skb) { qdisc_bstats_update(sch, skb); sch->q.qlen--;