Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033257AbbKEQAF (ORCPT ); Thu, 5 Nov 2015 11:00:05 -0500 Received: from mail.kernel.org ([198.145.29.136]:42607 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033090AbbKEQAE (ORCPT ); Thu, 5 Nov 2015 11:00:04 -0500 Date: Thu, 5 Nov 2015 13:00:00 -0300 From: "acme@kernel.org" To: =?utf-8?B?5bmz5p2+6ZuF5bezIC8gSElSQU1BVFXvvIxNQVNBTUk=?= Cc: "'Wang Nan'" , "namhyung@kernel.org" , "lizefan@huawei.com" , "pi3orama@163.com" , "linux-kernel@vger.kernel.org" , "jolsa@kernel.org" Subject: Re: [PATCH 2/2] perf tools: Fix find_perf_probe_point_from_map() which incorrectly returns success Message-ID: <20151105160000.GX13236@kernel.org> References: <1446729565-27592-1-git-send-email-wangnan0@huawei.com> <1446729565-27592-3-git-send-email-wangnan0@huawei.com> <50399556C9727B4D88A595C8584AAB3752604844@GSjpTKYDCembx32.service.hitachi.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <50399556C9727B4D88A595C8584AAB3752604844@GSjpTKYDCembx32.service.hitachi.net> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1375 Lines: 31 Em Thu, Nov 05, 2015 at 02:08:48PM +0000, 平松雅巳 / HIRAMATU,MASAMI escreveu: > From: Wang Nan [mailto:wangnan0@huawei.com] > > > >It is possible that find_perf_probe_point_from_map() fails to find > >symbol but still returns 0 because of an small error when coding: > >find_perf_probe_point_from_map() set 'ret' to error code at first, > >but also use it to hold return value of > >kernel_get_symbol_address_by_name(). > > OK, I didn't expect that there is a symbol which can be found by > kernel_get_symbol_address_by_name() but not by __find_kernel_function()... > Would you have any example of the error? > > > > >This patch resets 'ret' to error even kernel_get_symbol_address_by_name() > >success, so if !sym, the whole function returns error correctly. > > Hmm, that sounds tricky. I'd rather like to add *psym to kernel_get_symbol_address_by_name() > to save symbol and don't use __find_kernel_function() instead. Tricky? I don't think so, suboptimal? possibly, but it fixes an error, so should be processed quickly, right? I'm applying his patch and then whatever improvement can be done on top. - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/