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 0E2D22F24 for ; Wed, 12 Apr 2023 08:52:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B45BC433D2; Wed, 12 Apr 2023 08:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681289548; bh=KWC4I4EMt7wAag3IpbqLcsuMvMad7yvicpsrw1qUVt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mYtngLbmdhcbCawwD05Q8Ae42WAlU2iIIIf+RpaXB/mnwZXkqhE75WWx75m3+ugrc bp/oodqU/iAUFFV5mWPeo8SkJ8CUDUF+I8mzT9xhb+NZR7Lti4lHjUjHsP4jFOrkBw OnJsQ7lPVJ0Wc2L79+VlPKmvD83eZTelt5NDsQvY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Masami Hiramatsu , Mark Rutland , Tze-nan Wu , Mukesh Ojha , kernel test robot , "Steven Rostedt (Google)" Subject: [PATCH 6.2 141/173] tracing/synthetic: Make lastcmd_mutex static Date: Wed, 12 Apr 2023 10:34:27 +0200 Message-Id: <20230412082843.799762411@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230412082838.125271466@linuxfoundation.org> References: <20230412082838.125271466@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Steven Rostedt (Google) commit 31c683967174b487939efaf65e41f5ff1404e141 upstream. The lastcmd_mutex is only used in trace_events_synth.c and should be static. Link: https://lore.kernel.org/linux-trace-kernel/202304062033.cRStgOuP-lkp@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230406111033.6e26de93@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Tze-nan Wu Fixes: 4ccf11c4e8a8e ("tracing/synthetic: Fix races on freeing last_cmd") Reviewed-by: Mukesh Ojha Reported-by: kernel test robot Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_events_synth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -44,7 +44,7 @@ enum { ERRORS }; static const char *err_text[] = { ERRORS }; -DEFINE_MUTEX(lastcmd_mutex); +static DEFINE_MUTEX(lastcmd_mutex); static char *last_cmd; static int errpos(const char *str)