From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 757E2268C66; Tue, 8 Apr 2025 12:26:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115201; cv=none; b=gKjmsxC/ADoesZYSPJbVpXweC7ShUC72A6MJDMQHllpL0TKq7SxHPIlMlQxDr0mc8ZPrHr5cZFkkTeodua4z65nS43g7hc6pyUJswIFuiIg/naWQaUD4yvDcEsacJdwruV/e3g+kH6Stz4pTb7iuKLg+cHDIyKD+OaAMBH+Cjko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744115201; c=relaxed/simple; bh=uiu0nbp35unrB0Rd/R+ZVEUVoDPzar/Qi6jqX830a58=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jR+sluxz/ovdEdJluGhWDV2KCJ7WWunkGvYQLoERR4D8Pz3OzK/rdf68ePAazw4vMcTBa8nuaDamQB4vLLMkJ0jJilTf8nmoJ7PUL2qdMUHazBgnGQ0YO3DLBr5BsoT8PPYF0ou4uLZP1mO1RkvR839ehd+Ppru5vpCqHaHisnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=L/BAjVmj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="L/BAjVmj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04C73C4CEE5; Tue, 8 Apr 2025 12:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744115201; bh=uiu0nbp35unrB0Rd/R+ZVEUVoDPzar/Qi6jqX830a58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L/BAjVmjvf4ZDZlNt8DIORCKbJXaI7fUcQmvkcKhCylizil1kNpgvSWgJ3NYmsfOh /L2KU6QPw+MJvYOE45apOwG0UqUoUoPVFCqiC4y4RzWJHXPms3dTOkNpJNHab09kBG yNxKsDtnTY+XvX19pmjYxx5ZX4y/oogdnOTAN5Vw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, syzbot+a3422a19b05ea96bee18@syzkaller.appspotmail.com, Nishanth Devarajan , Cong Wang , Paolo Abeni , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.13 388/499] net_sched: skbprio: Remove overly strict queue assertions Date: Tue, 8 Apr 2025 12:50:00 +0200 Message-ID: <20250408104900.905441411@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104851.256868745@linuxfoundation.org> References: <20250408104851.256868745@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cong Wang [ Upstream commit ce8fe975fd99b49c29c42e50f2441ba53112b2e8 ] In the current implementation, skbprio enqueue/dequeue contains an assertion that fails under certain conditions when SKBPRIO is used as a child qdisc under TBF with specific parameters. The failure occurs because TBF sometimes peeks at packets in the child qdisc without actually dequeuing them when tokens are unavailable. This peek operation creates a discrepancy between the parent and child qdisc queue length counters. When TBF later receives a high-priority packet, SKBPRIO's queue length may show a different value than what's reflected in its internal priority queue tracking, triggering the assertion. The fix removes this overly strict assertions in SKBPRIO, they are not necessary at all. Reported-by: syzbot+a3422a19b05ea96bee18@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a3422a19b05ea96bee18 Fixes: aea5f654e6b7 ("net/sched: add skbprio scheduler") Cc: Nishanth Devarajan Signed-off-by: Cong Wang Acked-by: Paolo Abeni Link: https://patch.msgid.link/20250329222536.696204-2-xiyou.wangcong@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/sched/sch_skbprio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched/sch_skbprio.c b/net/sched/sch_skbprio.c index 20ff7386b74bd..f485f62ab721a 100644 --- a/net/sched/sch_skbprio.c +++ b/net/sched/sch_skbprio.c @@ -123,8 +123,6 @@ static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, /* Check to update highest and lowest priorities. */ if (skb_queue_empty(lp_qdisc)) { if (q->lowest_prio == q->highest_prio) { - /* The incoming packet is the only packet in queue. */ - BUG_ON(sch->q.qlen != 1); q->lowest_prio = prio; q->highest_prio = prio; } else { @@ -156,7 +154,6 @@ static struct sk_buff *skbprio_dequeue(struct Qdisc *sch) /* Update highest priority field. */ if (skb_queue_empty(hpq)) { if (q->lowest_prio == q->highest_prio) { - BUG_ON(sch->q.qlen); q->highest_prio = 0; q->lowest_prio = SKBPRIO_MAX_PRIORITY - 1; } else { -- 2.39.5