Received: by 10.213.65.68 with SMTP id h4csp38411imn; Mon, 19 Mar 2018 18:47:59 -0700 (PDT) X-Google-Smtp-Source: AG47ELsRhaNjNbMXv9jSLABfWxCSDIbvJTnKcEP6ndfVAsjmG01hziahHc7RgI4hhhNrMMPNZVYu X-Received: by 10.98.50.130 with SMTP id y124mr11997677pfy.147.1521510479744; Mon, 19 Mar 2018 18:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521510479; cv=none; d=google.com; s=arc-20160816; b=TuLS2ooFrQUYLFH9IV5iMebzlqAw6E18RPROT7F0pU5MPqmcw7Bi7wMtMbVjMFs+M7 AFtzNljMiQstYvgQopHHtipG/QU1+oYDuOcC0cyduWk2PCWwEjOw8wRJjGefFeVilYXO AjajtJ/DFfBeULS0UpqIPVXgmB9GZC51PyuBoZzNGcIKaytMNgsUXl3FiUCFAg3TbmUa vVcpEpIe8bCKUgg5W+sWvE+N0G9OUdrp/tS/pqv4AoCMgC4cN0r/CaP4jdhMDvZfO/cX UGSOBSqr5i8IEGQuEYEDgaFui5qHvIJaMG4H5Fe6ec0+1vf0gmhfXhp6X6C8hFkPSdcQ Nszg== 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=vNnxqQkVq+7smwG+NKZdeQsei0FVIGJaYPBRPpoTxQs=; b=p8tm9nRtSqBka4NgIX2r8UGFem6aVqCwn9N2Iz7mBavFF0cJfMo4LsrBB0pjBcJhs+ CohbsfOFHfS/QgqCfBI33SWwbAzo/jCXzot8ott40U+CL6DDdWNRYK9f10/Mgj3nZ10e YmpRgGcBHT6GHvx3NRUVjimFEdOSeoDeR4e9o9fUV3bHB9czkiHPdELml9U0oFzfD6Xa c9KJbI85hG0u+iTSLFh4a0TfnuEu0ZX4RwM9izBUayankhIfxM+qZFCF+f04E/37ohEX 2h4TnKg/g0EuMxdKk3D6qUmDJLYee0kdsifmdhDbth9mlZ08rQ5gG6CzzkqJwalA/WE9 i9Iw== 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 o4si398977pga.175.2018.03.19.18.47.46; Mon, 19 Mar 2018 18:47:59 -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 S970355AbeCSTwV (ORCPT + 99 others); Mon, 19 Mar 2018 15:52:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969380AbeCSSTi (ORCPT ); Mon, 19 Mar 2018 14:19:38 -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 3E193114B; Mon, 19 Mar 2018 18:19:38 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ravi Bangoria , Masami Hiramatsu , Alexander Shishkin , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.9 041/241] perf probe: Fix concat_probe_trace_events Date: Mon, 19 Mar 2018 19:05:06 +0100 Message-Id: <20180319180752.898616948@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ravi Bangoria [ Upstream commit f0a30dca5f84fe8048271799b56677ac2279de66 ] '*ntevs' contains number of elements present in 'tevs' array. If there are no elements in array, 'tevs2' can be directly assigned to 'tevs' without allocating more space. So the condition should be '*ntevs == 0' not 'ntevs == 0'. Signed-off-by: Ravi Bangoria Acked-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Peter Zijlstra Fixes: 42bba263eb58 ("perf probe: Allow wildcard for cached events") Link: http://lkml.kernel.org/r/20170308065908.4128-1-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/probe-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -3060,7 +3060,7 @@ concat_probe_trace_events(struct probe_t struct probe_trace_event *new_tevs; int ret = 0; - if (ntevs == 0) { + if (*ntevs == 0) { *tevs = *tevs2; *ntevs = ntevs2; *tevs2 = NULL;