Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3597457pxv; Mon, 28 Jun 2021 08:14:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkBiKKv22GSh5r8/F+fArLGGsDQEFBzV9+O1MfgC2o22TcuHXm8IMRYSRy+XUFsqn+RUGP X-Received: by 2002:a02:cb82:: with SMTP id u2mr106533jap.8.1624893284191; Mon, 28 Jun 2021 08:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624893284; cv=none; d=google.com; s=arc-20160816; b=Kjjf0VcHFCqhxkp0I4yo3pvIZDMisMB7FXU1BE3z7kkRDk3jkROhv/mmFfrdzfmMDz cqpU/LbmG+o5QY+8/IOnojU+f1SpHfan65OvrC+xHK6SDBo4FBbETileb8eU8A6Ns++E aJxn7x3TpLzVT1agXccWsO68bsrkcpRQ5AD7LuYDWNeB8Vb35fWG/X78qt9dvluTg2Pj 3JZd3Yc/pSJYFLicfRZ+e34u5jOAjEFC6qs0R1DdbPMgSF9NmrDwsvXkFscUjVvV3/TH PNwmvST270wLXdj4za98yuz0qrgkzJhcX7GDfKKmH+TdITq1qu4Oz+42NRn6+l68CuY5 X6LQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RfyoE01Emzn32Eo+v0f6lQSqgWN1WgZUz21PerEM+cU=; b=B6S7UsUyRTr/8wweTveSGafB4Dj6M1ybsF2ybdDY9Es42/SSUkSF2jhtWX6BfXypMv x7n/bnrC7jn6JjYQv7OHdZBqAZ8zmnSdpG244Vi5U6MkxFewxqrUdF/yE4YBGyrMK98t khc3FyK0ZrAFL8RA7Ca0DQB5+qeCz7EqVl6TcffrmjwN0eF2Erpf793ZUIl1T5Xg0SU9 tVEDev3eDByPz7Ou2dUNdttZTKxSl4XSOMX4Y9LinRfuiXho+X8z2wVeqWlfbApzIhZt eKzwYtrJCXgiQOeNfDHwIyJqCxqQJzcNwhN4t0lsBS+U5BfTQNAW2HQxtLN2hObgpNwb suWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LUgTBAjP; 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 u18si18334802jap.83.2021.06.28.08.14.31; Mon, 28 Jun 2021 08:14:44 -0700 (PDT) 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=LUgTBAjP; 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 S237044AbhF1PMm (ORCPT + 99 others); Mon, 28 Jun 2021 11:12:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:57924 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235023AbhF1OvX (ORCPT ); Mon, 28 Jun 2021 10:51:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 80E7A61C8C; Mon, 28 Jun 2021 14:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891030; bh=Uu1pE3wGjVqDP8N0XpPqMROJkfkhcNss+oR6hC684NI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LUgTBAjPvDQLfKuIU6BA45NrnkvgTc10WL+4jmBnejwOmYbWnj1yhx6QntT6gI33H fxYvC4JAaH52cpS8J5s8syzYuKM4wtUMzzPjB5JZW+FSH/28HwnFoHiaHpB6b6leO1 FmTTMCm0a08ENgjP/Nvg9xY2A9PmxGRl2pvNTxuk3RKaZ86hwayD08rQWd7+Ael8f1 tq6lFj3O1moFFMtAKa0yxg5wwPrUv2IDqDEKhsWcHmOIk6zXW/xlQhiK2Z6Au6hzgD C3mDepupGfAQoPAaKxJMAG8QgGNsXmiozdGr6LXq3hnKV4uOHPQPbSGLA7MMPreSEY 143NQaaEqFCOA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Steven Rostedt (VMware)" , Greg Kroah-Hartman Subject: [PATCH 4.14 47/88] tracing: Do not stop recording comms if the trace file is being read Date: Mon, 28 Jun 2021 10:35:47 -0400 Message-Id: <20210628143628.33342-48-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Steven Rostedt (VMware)" commit 4fdd595e4f9a1ff6d93ec702eaecae451cfc6591 upstream. A while ago, when the "trace" file was opened, tracing was stopped, and code was added to stop recording the comms to saved_cmdlines, for mapping of the pids to the task name. Code has been added that only records the comm if a trace event occurred, and there's no reason to not trace it if the trace file is opened. Cc: stable@vger.kernel.org Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index badc7c13da46..0cc67bc0666e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1737,9 +1737,6 @@ struct saved_cmdlines_buffer { }; static struct saved_cmdlines_buffer *savedcmd; -/* temporary disable recording */ -static atomic_t trace_record_taskinfo_disabled __read_mostly; - static inline char *get_saved_cmdlines(int idx) { return &savedcmd->saved_cmdlines[idx * TASK_COMM_LEN]; @@ -3257,9 +3254,6 @@ static void *s_start(struct seq_file *m, loff_t *pos) return ERR_PTR(-EBUSY); #endif - if (!iter->snapshot) - atomic_inc(&trace_record_taskinfo_disabled); - if (*pos != iter->pos) { iter->ent = NULL; iter->cpu = 0; @@ -3302,9 +3296,6 @@ static void s_stop(struct seq_file *m, void *p) return; #endif - if (!iter->snapshot) - atomic_dec(&trace_record_taskinfo_disabled); - trace_access_unlock(iter->cpu_file); trace_event_read_unlock(); } -- 2.30.2