Received: by 10.192.165.148 with SMTP id m20csp2474598imm; Sun, 22 Apr 2018 07:48:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+vuFoANon6JLvGsvfX64e7HfFECmjQI9pLLgE1mjWiEoNMgR5d3uy2nknjDWvODuMCruH X-Received: by 2002:a17:902:7e4a:: with SMTP id a10-v6mr13582643pln.276.1524408514158; Sun, 22 Apr 2018 07:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408514; cv=none; d=google.com; s=arc-20160816; b=ii2e4mXs5k8PFTgaSrevo10N9c5nGpievWRGmmQnETVMB72QW/aaaPxB9p3rnVrfjc 9BrxmNtbQDM0X/54VCGPeJLJrz7AH21uDfidG7Jcm75EDbswBd4UODs9DzFbvwnLDk5i emAZqJAMhhypq7YEWCaR+7GQJl2MQHNGRVTTS6arO5ngc5jYPeRfGtcyw5wyn0ZRhXtC D060a71q8BwKmBF5MMx+IzthQccPaYeGnX+Ey3JYN+sDW/xmSmKORLE2mRPCqwlxFSel pQxoVzUZKC5iB6eRDBa+bHG5Rj3sLY3dH4ygwXBAuUf0d68b4T2NV8KpQqtXm+FWTb9t jClw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=g3NwA/PDuMlgYdYh09fQMLWSv37NeLUi5kuCUoje2xA=; b=za2DTAxv63CqnyvbuXfrUI4CjeBtgQgzYbgrZVfMr4TW+Gktco5Bc81rlD16aEb64w bqqtl5Xg+eBaNXNaJBj7gg+ABXhBzQEc20L81zm1a3EwXAwi5g1l9iimAmymn66TMR+v NSoQGqmtaRoUAUaXTOOFHiKLAWQmgmBGr1202MPK5NvDMREJG7knwGEODRUckSBgjq9x y6RPuzULFDZLDPxhWF7URm8Ec2+1zRtC2bZHrsLGur/WaCIUigsSEK1vYxQAXEyi6d0V O8GzRTzGua+vBDlVQGdIfOGUoNp8Ed0On2BZBWocJ1+xZa5+5zcKivFVphVxEclYyJsj KulA== ARC-Authentication-Results: i=1; mx.google.com; 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 v12-v6si10309054plg.180.2018.04.22.07.48.20; Sun, 22 Apr 2018 07:48:34 -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; 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 S1757157AbeDVOqL (ORCPT + 99 others); Sun, 22 Apr 2018 10:46:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57612 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932116AbeDVOQj (ORCPT ); Sun, 22 Apr 2018 10:16:39 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 94E5DBA0; Sun, 22 Apr 2018 14:16:38 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 4.4 05/97] perf intel-pt: Fix error recovery from missing TIP packet Date: Sun, 22 Apr 2018 15:52:43 +0200 Message-Id: <20180422135304.929680811@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit 1c196a6c771c47a2faa63d38d913e03284f73a16 upstream. When a TIP packet is expected but there is a different packet, it is an error. However the unexpected packet might be something important like a TSC packet, so after the error, it is necessary to continue from there, rather than the next packet. That is achieved by setting pkt_step to zero. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -1492,6 +1492,7 @@ static int intel_pt_walk_fup_tip(struct case INTEL_PT_PSBEND: intel_pt_log("ERROR: Missing TIP after FUP\n"); decoder->pkt_state = INTEL_PT_STATE_ERR3; + decoder->pkt_step = 0; return -ENOENT; case INTEL_PT_OVF: