Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp879600pxb; Fri, 28 Jan 2022 12:09:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUr4ALJggNvbEyA4FSVe5Y+fg8SzecszvJAjheAQ3YDfTaknPRvyttDHa04JlHXS7GdKN0 X-Received: by 2002:a17:907:9494:: with SMTP id dm20mr7959976ejc.148.1643400560442; Fri, 28 Jan 2022 12:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643400560; cv=none; d=google.com; s=arc-20160816; b=pLeNfiPpFnbyup86r3588bpg7knTjku83MWzQdbk7d48lVgPVjyTVtbaOPosHrXVGV eNlG8CNu4RarTAXzvT1ue0g70VT0Ogjf0eOPthi/oScxn2Tcuzlusvzudoz6C+9rCGoE ikqauRaUe2MDMgGa5mZsm1E1dU+OcRQW6r8BqQo1nI8PfmUfU/kJAD2LQ4U+GVQroRXk Y9JUEUO7oOlMRDj7yrMN8Oy99NS5sTicUx6xmdtvRFhsuLGYVQn9SnC+zia6jWx+fAOM XNY6/YsN5t5K6TWILKRY43mGydGuGcc8UEw8Lmy5sZ+oL8jy+93wrLNrNt/t6IniyiDv kJtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=6mfDaUQ5N9FyzakYfONQEFv01X2GBrSo/3CK41kk1ts=; b=itjp4FdtZW2Vs+xM7pHTuIhmoF4ABEpM1s5VLHihBw0vy9XoifTDOr8mEkSjIpGlU1 4Lr3A+yGv00bCgp0IUDU4l8/IFpYMvNiCmxACjEAP0sfCOMNeCF+hRB4K2P8dfX58kZI 3p+Awu9GK3BsaJdq8IjVniI/qRzzppSwGNQYzdZNzw8QC5u6IJQJV9ZshPa3ZEseJCCX sgtf/5WnPzZROVBoQA9oAeWA1YP6sqAxKZjvyoD/wOYRt+iozIz+FZWgc9/OVuad/TBb c5iHlGUlAzOfwA9UCxu2XxR3NvVFaiHcHBR46kNRBsB2W0zsDpPCShtjL7g6C5F1DxCF wJ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QY2Xc54s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u8si3533076eds.8.2022.01.28.12.08.56; Fri, 28 Jan 2022 12:09:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QY2Xc54s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344463AbiA0Vok (ORCPT + 99 others); Thu, 27 Jan 2022 16:44:40 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:47392 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344454AbiA0Vof (ORCPT ); Thu, 27 Jan 2022 16:44:35 -0500 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 01B3261B1F for ; Thu, 27 Jan 2022 21:44:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10803C340E4; Thu, 27 Jan 2022 21:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643319874; bh=TY2/eIey3Ob7eTs/QussZy9ldJo+Y1IYYRhYib8jcMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=QY2Xc54siv4n688VwfapexPI28URXmmZqPHEHaqmKDDBjoFOkrJf6EFTCbBSTrCK4 ZLL4XEPAG+enXJJtPiGD4SnlVSoWh3cG2y/0q5Ci3d/n020iVN8/YGvbmr28riXzSf t0V5cFXKSGCNu2aoTVh63u1fBEun3iTJrU+H8ARLDUIDLERBPN+H9TWSGEFgv4rdwN lN/sakSXakVhhwGVwURUAEjwnLDIxGvwxrKpl9n5Nif+NqjlDPsSb1HM5/7Wyi9QbP iFLYcdtmregOcVH+7C/L3AKRinfx4qO2cAsrUCUKpRq8HJGqc7pDWSnyJJBqlqngsK ixFbHEeAF7iJg== From: Tom Zanussi To: rostedt@goodmis.org Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, Tom Zanussi Subject: [PATCH 4/7] tracing: Don't inc err_log entry count if entry allocation fails Date: Thu, 27 Jan 2022 15:44:18 -0600 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tr->n_err_log_entries should only be increased if entry allocation succeeds. Doing it when it fails won't cause any problems other than wasting an entry, but should be fixed anyway. Signed-off-by: Tom Zanussi --- kernel/trace/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a73d78dcda2c..addd8297874e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7740,7 +7740,8 @@ static struct tracing_log_err *get_tracing_log_err(struct trace_array *tr) err = kzalloc(sizeof(*err), GFP_KERNEL); if (!err) err = ERR_PTR(-ENOMEM); - tr->n_err_log_entries++; + else + tr->n_err_log_entries++; return err; } -- 2.17.1