Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp323349ybk; Wed, 20 May 2020 00:08:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYkI+I8Dbul55JpSEs8H2ItxVEjj3kHR4nnXrBP1L6tR2S6hOct7MrQXzc1x0iGBvd7XPv X-Received: by 2002:a17:906:938a:: with SMTP id l10mr2526904ejx.186.1589958490233; Wed, 20 May 2020 00:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589958490; cv=none; d=google.com; s=arc-20160816; b=VId2rTEIfP0tMlK9uWyXI5/AgqDRfv111cdzGRQwfplTHXu3r4grPG6KQzWL8/7tXP WVFrTHFAr8AAJCJTY9IAp6iUdZ62gEcgzg7qH0Qs1Z0y2I8o5OebvHNi8O08CK+9DPIS lVihGQBw1OTUU4gnILa9qGjHG2DRbuq8ES7Oa2pJxH+VD0+1hu1CqcRwtD3i1peXdUgp QuLae96P7Wq44SE01lATVh262p61VFSqWTUlfbxN66ulDdDa/jX9jqVdy/K3p/qgjFaq 5nkv4lzzybWBcQhbeWQ8qHwMUxy0lmRlbzF3wkNfrFo4nF+k+O6u5bxGomeKLhJe0cLm T2AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=12r6Pw0ocdRXl1n2t8Xeq4Bd0G+JXCXMNugfD9+yIIQ=; b=NyyeFq+rNyRaq54fTf2YD5GuhsaLeloAoEb/ZfYVBndYdGo/lJtgczjavRh5K3UzQ+ fZMlKNeokwYoBqpbtgKI1tkbQwgK8TaHK+ilZLpim4jmbPDNRwtLP6pqdmD4ZAYGZuPt Uq5sSw3PWXy9gZ2e3rbsGtK22r1hH43yCyKS9eYP0Hez3Qn1sAHoEAblt57aIYcf8xse 86I4oUnwwG4+BFjbb7JJsx+gjfCtgSd9lwGukGiZobZBkCmKPVWL8gy1+PxJ3b+WuODf y1XdZ7abLplfu7slX3MThey+yWwSPTSOaq1PcXSC1NDXD3TP3jdeBFtkMDOQPTEGmijk y13Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SEhJWQ57; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si1139456edj.301.2020.05.20.00.07.46; Wed, 20 May 2020 00:08:10 -0700 (PDT) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SEhJWQ57; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbgETHGA (ORCPT + 99 others); Wed, 20 May 2020 03:06:00 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:48309 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725998AbgETHGA (ORCPT ); Wed, 20 May 2020 03:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589958358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=12r6Pw0ocdRXl1n2t8Xeq4Bd0G+JXCXMNugfD9+yIIQ=; b=SEhJWQ57M4yP1ARlB3EaDU1MfxhZue82ltX8OAdyDjc9/JjaUlnuVpkOfreq70a5NmjhUR t7nt2YtQ0aJwVQKWTaavjPDXIrxdnq5/S4N6NM/+vw3w5Z63SXeqhwz4M6qMMEH8q8Kn5g 7Ly+5gPFGKzuGs6b2DnZdOwErB0MwCI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-102-hp6Vo_v5MlSkVVNrj1qJlQ-1; Wed, 20 May 2020 03:05:57 -0400 X-MC-Unique: hp6Vo_v5MlSkVVNrj1qJlQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 536AD107ACF2; Wed, 20 May 2020 07:05:55 +0000 (UTC) Received: from krava (unknown [10.40.194.155]) by smtp.corp.redhat.com (Postfix) with SMTP id 6F14F5D9CA; Wed, 20 May 2020 07:05:52 +0000 (UTC) Date: Wed, 20 May 2020 09:05:51 +0200 From: Jiri Olsa To: Wang ShaoBo Cc: cj.chengjian@huawei.com, huawei.libin@huawei.com, xiexiuqi@huawei.com, mark.rutland@arm.com, guohanjun@huawei.com, acme@kernel.org, alexander.shishkin@linux.intel.com, wangnan0@huawei.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos Message-ID: <20200520070551.GC110644@krava> References: <20200520033216.48310-1-bobo.shaobowang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200520033216.48310-1-bobo.shaobowang@huawei.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 11:32:16AM +0800, Wang ShaoBo wrote: > key_scan_pos is a pointer for getting scan position in > bpf__obj_config_map() for each BPF map configuration term, > but it's misused when error not happened. > > Fixes: 066dacbf2a32 ("perf bpf: Add API to set values to map entries in a bpf object") > Signed-off-by: Wang ShaoBo > --- > tools/perf/util/bpf-loader.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c > index 10c187b8b8ea..460056bc072c 100644 > --- a/tools/perf/util/bpf-loader.c > +++ b/tools/perf/util/bpf-loader.c > @@ -1225,7 +1225,7 @@ bpf__obj_config_map(struct bpf_object *obj, > out: > free(map_name); > if (!err) > - key_scan_pos += strlen(map_opt); > + *key_scan_pos += strlen(map_opt); seems good, was there something failing because of this? Acked-by: Jiri Olsa thanks, jirka > return err; > } > > -- > 2.17.1 >