From nobody Thu Dec 18 12:59:20 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 416A7C32772 for ; Tue, 23 Aug 2022 09:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240812AbiHWJCZ (ORCPT ); Tue, 23 Aug 2022 05:02:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241632AbiHWJBv (ORCPT ); Tue, 23 Aug 2022 05:01:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6077E233; Tue, 23 Aug 2022 01:28:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3C29D61326; Tue, 23 Aug 2022 08:27:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 305CAC433D7; Tue, 23 Aug 2022 08:27:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243236; bh=gFrB6xe1KXgTAI+7ObVJ1Fp1IKo64uT9FKvA9uEdWR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=obk91VtWGTwE/3sfnlOD/ZS+mtx4agY5M2nX/ptsDJcWUKyb/1Z9L3hfiJA2A316t 7eEICRcmDnAYFTSVg/yjwUemY04ur/hfSztWknw3E/b0mtYdGavTE389o9kBiovxWs 8g8eGeQ+kF2jJefPrKObzRbw9ZalzwLI2UL1p0xk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhengchao Shao , Jakub Kicinski Subject: [PATCH 5.19 213/365] net: sched: fix misuse of qcpu->backlog in gnet_stats_add_queue_cpu Date: Tue, 23 Aug 2022 10:01:54 +0200 Message-Id: <20220823080127.120619852@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Zhengchao Shao commit de64b6b6fb6f369840d171b7c5a9baf31b8b2630 upstream. In the gnet_stats_add_queue_cpu function, the qstats->qlen statistics are incorrectly set to qcpu->backlog. Fixes: 448e163f8b9b ("gen_stats: Add gnet_stats_add_queue()") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20220815030848.276746-1-shaozhengchao@huawe= i.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/core/gen_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/core/gen_stats.c +++ b/net/core/gen_stats.c @@ -345,7 +345,7 @@ static void gnet_stats_add_queue_cpu(str for_each_possible_cpu(i) { const struct gnet_stats_queue *qcpu =3D per_cpu_ptr(q, i); =20 - qstats->qlen +=3D qcpu->backlog; + qstats->qlen +=3D qcpu->qlen; qstats->backlog +=3D qcpu->backlog; qstats->drops +=3D qcpu->drops; qstats->requeues +=3D qcpu->requeues;