Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3809090ybi; Mon, 29 Jul 2019 13:03:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmv5iDDpIcx6QR7YW28Jdf7OdNuxL6hFcudDqucNlFnkv6Rp8YocSrlAjchNSiYn8148ao X-Received: by 2002:a17:90a:d14a:: with SMTP id t10mr73938933pjw.85.1564430608112; Mon, 29 Jul 2019 13:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430608; cv=none; d=google.com; s=arc-20160816; b=HR1lncBEkT9gXvoQXqS9fYpH+yvtRakBVfINiuWeut8hH2p8JEsydPyDYBVeehoX48 ZebSxbMGC01KwgWe22GiVsiuS7cqDh/AoK/IUXPc0zG5irfghws9jcbHVqHVnX3N+ib7 JT2Q03W8D8MGjYGh2CIOzqU1pIuJhWek6dGMR+dOfWHQBOVrsry7Bgyqss5Hqrb0Vl/q AEDtvUYfR4ffl7Kg5aQJXmHf3j4+XkMgEuLAaUiv72D84Mi4gJU2O+gMjNqnGDCsDcuX q2wQODdLZe9KheOM0oRtzsHloYoHBKFRLpjyJdRBgaDR3C0n4nfj2mg3tOzojDTuJEHN r0+A== 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=8H+2Jj+sCmZ6spu4vvi4ClUlCnImNxe5NUhj0RcEhM8=; b=CvORuxjf6D2yjrtc1ZHFnZBokI4pPhiqFxXQ17TfSED6zdkNT64y2MfYsh7Pc1o+vr 6yLilmE4KShjGtrH3t9BoU+SRpyQCbQZlftbB+ZvCT36saejrTl9R4F8jSkOsyO8faaT 0Sy/iIMKHSW4z/j+nLJir2aDABkYXkRUeTcyp35WxdoGjLv/pDU4sozelP13phZ08H1o 7RS5fWBtkHEWPRY9GdScfUNHQwEiex3ddIRIzU0qpEfTPJPUAGum7XnkqbxadgC5kMr4 IybvomoiJMUCDWKrwPI0WM+M4MojZiWjvKE+C3evS/ivjFfaZmE3fiqaAjXpfZn7pVD1 o38g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=R+pRipdf; 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 p12si52623722plq.331.2019.07.29.13.03.13; Mon, 29 Jul 2019 13:03:28 -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=R+pRipdf; 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 S2390545AbfG2Ttg (ORCPT + 99 others); Mon, 29 Jul 2019 15:49:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:40058 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390299AbfG2Ttb (ORCPT ); Mon, 29 Jul 2019 15:49:31 -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 4BE15205F4; Mon, 29 Jul 2019 19:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429770; bh=/6BT4lrHx6h+19CBgVzQ1g8yCgOr7XrC7Iko3b39SZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R+pRipdfgz1e3lUZ6ykCmBOts9tKfdWg5M5pTR2Drdx21+Wpqyzi4v69uOz6R5i3X OpgCSxPMyPNB9o/hdw+tIRSjn7JrtuWBijsUMn8Gr/2OrifiQSwKV4fmiqfHoyXV98 rfLwP7rL7qm0I2Rn4HWaIUvevQ2aBHtXARu1PqkY= 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 5.2 091/215] powerpc/xmon: Fix disabling tracing while in xmon Date: Mon, 29 Jul 2019 21:21:27 +0200 Message-Id: <20190729190755.141054869@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 d0620d762a5a..4a721fd62406 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