Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp219338ybk; Tue, 19 May 2020 20:34:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySJb72leSAk7QWHvl5IAFCiIMLGQWfSG2aOdLmAEzHbN9YMR18bvhtjW1BFmaiuD17BL5Y X-Received: by 2002:a50:ae02:: with SMTP id c2mr1437541edd.373.1589945674286; Tue, 19 May 2020 20:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589945674; cv=none; d=google.com; s=arc-20160816; b=PsRagW5ThIHHq7H7bFljdt8IQuJ7q533CaJVXriftF8eL6aq1iN45kR3J2qyllWaHp KRFqGfxBvvxfiQyveNQb9Jpk1e5X9WLSnNPAEL4EgEewvnZezLbST+jzdiCbiHvtMBBC wIfRSCXfBWkT5/FGZuIcY9LKmmm2/kWkIuHlMTRn3BYDqgQKYzmplke/R5CjxNjsS6lu lgRa7dAc7/QqlIgttE0tANVdZXJw1o3rVowZlDDmBCqHyU5ybxplFcWHe4V8MVBNAsi2 IoEFGKvKBhqFaAzewTFEihIirVsNFVWw3eB/3zriHdWPaGUMpuXyrTbJSOWzG2YNVZew kqwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:mime-version:message-id:date:subject :cc:from; bh=tc/naru69hb6/edGODLLPQBT4M7ILnfIplhTODugpbw=; b=eLm5KZAWFmSqimdtDTeCHPC55OPsXU/QCM/QwKNKVn9NCBQlR0L5zSOPwX7CaAy98o 61i/8FD/ypsgxOqLJBe7YOFTVLQMHQ0ZyA7UC6xyIESzFlNf0EIVLCAei7pAZNXFGdRX UuSsagjRDVvdKitZ10Qtcr4W492tMq/Yd30yKrpzABBZ58AXCvlUGNPuJ98y2pAn5KJ4 lerzIOUg+kB7H1wlwRyr97DjzvEMs9RNVhJiam9IGy/NsfHltIPKwUZdcCUR43V0KWNm eAmVBBFm7gBLDzEdZejkgCqV6g0nkw/GadEXA6SNjgjZW4sq5iVpIskm9bEdkDv4DH/o WPLA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si1006159eji.236.2020.05.19.20.34.12; Tue, 19 May 2020 20:34:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728642AbgETDcd (ORCPT + 99 others); Tue, 19 May 2020 23:32:33 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59806 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726432AbgETDcc (ORCPT ); Tue, 19 May 2020 23:32:32 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 251B519E1456738066EC; Wed, 20 May 2020 11:32:30 +0800 (CST) Received: from huawei.com (10.175.124.27) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Wed, 20 May 2020 11:32:23 +0800 From: Wang ShaoBo CC: , , , , , , , , , , , , Subject: [PATCH] perf bpf-loader: Add missing '*' for key_scan_pos Date: Wed, 20 May 2020 11:32:16 +0800 Message-ID: <20200520033216.48310-1-bobo.shaobowang@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.124.27] X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); return err; } -- 2.17.1