Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1677039pxu; Sun, 6 Dec 2020 03:44:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxljq2kyKePzvTg8576B6hXH/SFC4N3fqKt0tEbmAKIPx8Sqe6SQyNWr0YYK5/nJePX7SBh X-Received: by 2002:a17:906:e81:: with SMTP id p1mr15088474ejf.494.1607255040974; Sun, 06 Dec 2020 03:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607255040; cv=none; d=google.com; s=arc-20160816; b=XC/Zv9BuUNjJaX4WIbrGNun3WvTlA79l/ALGdOjCog84RER9PNEc7GPbTQUiiDrD91 vvmMBowiDuIBo7rXRAA+Hfq0b2SDTTOhwm69HNkbLV3fXXyZ4ItjFSTj9EWEknd0N37M zEqWoqKlolu8WmHeRRGKr25iBmifvoda89C/NkkW8zJvvUNZY/mM/NtwIItUeNoUT/+j vSODOoK1RO3fOihX6ddTOVHD6zmAQZlpIEaSL5Hlx3gyMG2sSbTG4mbZqi0NOTJ8sOl+ PiNpSxyxOrP6ybtUfDcIJIN1j4W0cbXCC0+TQ1V+Kw/EwviGgZd3T36hvlH7YIhXKPBY Rjfw== 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=HQJB9D6iL0zeYhlkVFbS7JQ/5v6rwpWSADktWlO9vdtTH0lRB4AbdExCRn+MjpyTh1 +ccApeT4q7WXLeJMHR9gnpGCfsncMLYlm+Z2YBQydG4NyFF1SfFH3Bvf/5yp/4vA91Qb UKhU56QPHKmgy16RWAkZm/glNOm11YfevSrfKdwZ4zvkXyd2WgE8POAa7plz/MDxiIGm DOEM4fvgOAxEeFTtWaImmYlSigl3D+65X/yDOpoqtcPls2bkFtFlDNGIQmk5mXmXRgaL gVYVxey5CAm4neeoBAXaX2d/dO6l32T0TvOROsdi7r/jLB7QZ1AytDL+9+KotNnHgcMx vMAQ== 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 r6si1871894ejb.640.2020.12.06.03.43.37; Sun, 06 Dec 2020 03:44:00 -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 S1728617AbgLFLke (ORCPT + 99 others); Sun, 6 Dec 2020 06:40:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:37932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728588AbgLFLkd (ORCPT ); Sun, 6 Dec 2020 06:40:33 -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 4.19 31/32] tracing: Remove WARN_ON in start_thread() Date: Sun, 6 Dec 2020 12:17:31 +0100 Message-Id: <20201206111557.264012863@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201206111555.787862631@linuxfoundation.org> References: <20201206111555.787862631@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 */