Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3788208ybi; Mon, 29 Jul 2019 12:38:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqye67rSLXIedGSCpVdbHtkWyEiyL+h795J+MSJV3KzsH/5wqV4+bmQqhmY4p/qKbgNIHSVR X-Received: by 2002:a63:1749:: with SMTP id 9mr16635002pgx.0.1564429081564; Mon, 29 Jul 2019 12:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429081; cv=none; d=google.com; s=arc-20160816; b=K/XwLBYA9AwyVDHWXD3ogSAFns8r5a/tmiBP0yDBnvjeHWkOGYLy94nC/uuE13/Zq4 WpHF4hdQBkK8qhN6EcP4PvaKOumS6zZeGHYzjjea930OV2TMNkMw16EOUiSy6Hi/6ZUr UABiaFDP7IcQy8wIjtqthWLblSlQNPp64Zi9DciQdoBiZi8bJOcoWnowWyV7RbhGIKt5 5gjOCNhfsf+MPpnGVrNgTganC0tBSiTmafwKq7nWgXSGMJIQQufQYXUT0CRfC1kGlYIn M4ljzhh+H+kGDZfGYi4L3fhsQcASFc1MJqcHv0Pzb5FQdFjv6R83VPeYTUR3jaP7qrAN tdrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RhqdyxCjtF2lpejgpCHl4oTnrwe6HTQ55/gd9OEZdrM=; b=l2D0RGMr1ZyHMcWzMM9FR8h2KKmhJAhX3JQ0wut31SNljTAFCS0IAObtF3U0K5o8Mo eddqp8jHrbutkmonOY5kMzVzk9hEjbtotx1KQkGeioCczC+rDxETMx3p67zbE4FxxBd0 P3R7R1RpWnbUooFJeDIHq2IVF/hjxJ7v6tVloKTaaolX6yYU2BwknW+pA9fLHEBAp72w 00VDncqxUs6ZqrEX34Ika31FLJK5yzhN+u8OSKeQ10UI03HsV+zKn9j5MWtw3DKk45+d 0vU57q1aC0Hm8VY8rC9oWXf+K/iG/BZMyUTFkptLt23L99VUa9vDi1GN/VndaT9K9Uo9 XICA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwyI7Y+Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si27627982pgh.190.2019.07.29.12.37.46; Mon, 29 Jul 2019 12:38:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwyI7Y+Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729051AbfG2Tgb (ORCPT + 99 others); Mon, 29 Jul 2019 15:36:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:50854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388602AbfG2Tg3 (ORCPT ); Mon, 29 Jul 2019 15:36:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BB88F2171F; Mon, 29 Jul 2019 19:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428988; bh=9ESrNu5NJMXrow44hUqFXCL823sSOIDtv5abrc8ySec=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YwyI7Y+ZATjwUP0d3UwImnuXjWsJnLvgK/K6L1aVkpmJ+PUMEDoC0n6KbmBd85v9b mdlHGjVkTXcQeqdm97kxGe/rWhjbbmvD9O9gLkyRg795WVtIBvK2ZsQyg0y4NtDJhi WTdnyZbkvhsMNDGXehNr3S4hinXtCKd/oliiBL+U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Naveen N. Rao" , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 249/293] powerpc/xmon: Fix disabling tracing while in xmon Date: Mon, 29 Jul 2019 21:22:20 +0200 Message-Id: <20190729190843.523886551@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was enabled on xmon entry, and used this to conditionally enable tracing during exit from xmon. However, we are not checking the value of 'fromipi' variable in xmon_core() when setting 'tracing_enabled'. Due to this, when secondary cpus enter xmon, they will see tracing as being disabled already and tracing won't be re-enabled on exit. Fix the same. Fixes: ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/xmon/xmon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index f752f771f29d..6b9038a3e79f 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -465,8 +465,10 @@ static int xmon_core(struct pt_regs *regs, int fromipi) local_irq_save(flags); hard_irq_disable(); - tracing_enabled = tracing_is_on(); - tracing_off(); + if (!fromipi) { + tracing_enabled = tracing_is_on(); + tracing_off(); + } bp = in_breakpoint_table(regs->nip, &offset); if (bp != NULL) { -- 2.20.1