Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1678771pxu; Sun, 6 Dec 2020 03:48:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAFu36xU5GM44dwyDK8X+/MlL3g2fisSlN5bWdIaAzxy17BZ9ijeg/ezbpO4saY0E2lqJ1 X-Received: by 2002:a17:906:1a4e:: with SMTP id j14mr14630641ejf.507.1607255292421; Sun, 06 Dec 2020 03:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255292; cv=none; d=google.com; s=arc-20160816; b=h1sn7uIz2iL1jo53slW53rMKmkUhbtHFAR81bXtSXD9AuCJF4RyCkBoO7PkRIvSrSX IliMDQowdrmGANWdpMtijraSvzzmjU7G2sMrdtcAIuZsRqWodpFSe8j71CnRYXNdZJb8 s5h30DFn19H6Y2MqJrAw61KS19Iuk7T35tq3WHpkaNNJWbjPVrrhVlIM4fHDNMYdspQs Ir4uX0KJkIjrMZkSZFJBvv1deG5pMx4UyalkNQW1/HgI3p3FNWf5WL51u6v98pCRxFvG xsOG6mSGSdOv2ASoRRXbQ7Hk8WBuc/0lOZ7/+FtQtCt01Es4lrC4D9fMvH9NRHFpzKAg 9Jyg== 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; bh=fVaeOiIVxmDfdEdo7RWK+U/KirLl27XftPsB68JRNvU=; b=gKy9lXEtMuPDozEN7T2GSWjBf5TqMQYabLGX8mkUHOunlJZOPLwG4kfvGJiswLMlz3 7GV5wlZwlW2h2sS6kB6slPuYt143nR2/W8k9z7TzKNues627noL/lU5buWyfP+AGigmM La9XYc/qbuSnX29BATQmPcZKCkcz6ncZx1RWsXmWC5LalL+NH0hVB7DmdSJKIpxnU68l 57AKk66RIG8osVeH8hYUdzolUqmoh30nXfa9UG0VuynXh5N4h4kL99W7TQMTHIkx8wET GVsg3l5DQxkF2oN5QaCt8w5m6A95BSuFKGXwty2XRuamP9xCClKEVPlZUU+o4fX5TibF jtsw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si4725738ejw.380.2020.12.06.03.47.49; Sun, 06 Dec 2020 03:48:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729254AbgLFLn5 (ORCPT + 99 others); Sun, 6 Dec 2020 06:43:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:43368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729213AbgLFLnw (ORCPT ); Sun, 6 Dec 2020 06:43:52 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Vasily Averin , "Steven Rostedt (VMware)" Subject: [PATCH 5.4 38/39] tracing: Remove WARN_ON in start_thread() Date: Sun, 6 Dec 2020 12:17:42 +0100 Message-Id: <20201206111556.483147152@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111554.677764505@linuxfoundation.org> References: <20201206111554.677764505@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasily Averin commit 310e3a4b5a4fc718a72201c1e4cf5c64ac6f5442 upstream. This patch reverts commit 978defee11a5 ("tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists") .start hook can be legally called several times if according tracer is stopped screen window 1 [root@localhost ~]# echo 1 > /sys/kernel/tracing/events/kmem/kfree/enable [root@localhost ~]# echo 1 > /sys/kernel/tracing/options/pause-on-trace [root@localhost ~]# less -F /sys/kernel/tracing/trace screen window 2 [root@localhost ~]# cat /sys/kernel/debug/tracing/tracing_on 0 [root@localhost ~]# echo hwlat > /sys/kernel/debug/tracing/current_tracer [root@localhost ~]# echo 1 > /sys/kernel/debug/tracing/tracing_on [root@localhost ~]# cat /sys/kernel/debug/tracing/tracing_on 0 [root@localhost ~]# echo 2 > /sys/kernel/debug/tracing/tracing_on triggers warning in dmesg: WARNING: CPU: 3 PID: 1403 at kernel/trace/trace_hwlat.c:371 hwlat_tracer_start+0xc9/0xd0 Link: https://lkml.kernel.org/r/bd4d3e70-400d-9c82-7b73-a2d695e86b58@virtuozzo.com Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 978defee11a5 ("tracing: Do a WARN_ON() if start_thread() in hwlat is called when thread exists") Signed-off-by: Vasily Averin Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace_hwlat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c @@ -355,7 +355,7 @@ static int start_kthread(struct trace_ar struct task_struct *kthread; int next_cpu; - if (WARN_ON(hwlat_kthread)) + if (hwlat_kthread) return 0; /* Just pick the first CPU on first iteration */