Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3386981rwa; Tue, 23 Aug 2022 04:04:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6t4XSUy15mkel01VY2K5+pJwYM1x4OgC3WxomVjt/G/7ZSD/Ti7GTShAS0w2CsJp0vRvQo X-Received: by 2002:a62:7bd8:0:b0:536:9c1a:1ed3 with SMTP id w207-20020a627bd8000000b005369c1a1ed3mr9499360pfc.77.1661252659648; Tue, 23 Aug 2022 04:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661252659; cv=none; d=google.com; s=arc-20160816; b=0BnYIGqNbtzLjfldvz3OR6k4JXc5m1EKK9+Wga9PGJO2/gd+p46Pdfydwops9vbAbU wGDpjgOLg8h7Y2h7+86ekYWifyFCnT5d+RUEamRgJjxQ8ZPtKgY/hrVuYjso9xwpLTaD MsEfz48tsHStmn656sByzymslcMCehfAiWoZjLEz1qNIL+X/DchTHbkxGKtq32PPidyA u+/Knwn4CmeQf1FeS637tyvHmvCpMTQKQvRS5TJDs4mXhviDLjCCMbb06bFoz3yoZ6o/ qUJdfPUw+TFac7/NI0RhI8Ro2fIBMSgLYIzmd1XN3TooSD845YhxrUxomxb3YdStokNd gRgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=koRbSNrxTXL/Jer4bpkQaFf63un82dZKrP4PkcXvvLg=; b=a9eWjFvbUkIqjIoNZNg/Kh/6r2J4KPmh1JX+kpNQ5wLpf8SGD6HjwCjuZe5y3CES24 uDyr5k+rwVnrCnWZGR9+E9Ca58GwQ8V2xHIFQ6ZVkjm3s9DGPVUvWBO0MwqkfqTEQAqX 7GGNVXhnoeNMNYAcIRGW2fsmQXmchDQV5+Tmb3Hmen/HOEFch+a1iCPG6m8d1GvZo0Ga wKDQBEeHn06EqdWnkMtCoQzJX3Iv+pHaaL77BPWc9pMb9tMHTD4YDfjuOSwzLH7bEuZV WsK0nj6HvBccMKooiGpH8wOSbec+gBZZ+TT8wcs9KQXiywH9ybR2dBHpgQoXfyWRAKOD h+Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=obk91VtW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a63c00f000000b0041da571906fsi15317709pgg.121.2022.08.23.04.04.08; Tue, 23 Aug 2022 04:04:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=obk91VtW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239852AbiHWJCY (ORCPT + 99 others); Tue, 23 Aug 2022 05:02:24 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@huawei.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 = per_cpu_ptr(q, i); - qstats->qlen += qcpu->backlog; + qstats->qlen += qcpu->qlen; qstats->backlog += qcpu->backlog; qstats->drops += qcpu->drops; qstats->requeues += qcpu->requeues;