Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753164AbbDAMMg (ORCPT ); Wed, 1 Apr 2015 08:12:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51104 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbbDAMMf (ORCPT ); Wed, 1 Apr 2015 08:12:35 -0400 Date: Wed, 1 Apr 2015 14:12:22 +0200 From: Jiri Olsa To: Wang Nan Cc: acme@kernel.org, jolsa@kernel.org, namhyung@kernel.org, mingo@redhat.com, lizefan@huawei.com, pi3orama@163.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] perf tools: unwind: ensure unwind hooks return negative errorno. Message-ID: <20150401121222.GA10820@krava.brq.redhat.com> References: <1427884395-241111-1-git-send-email-wangnan0@huawei.com> <1427884395-241111-2-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427884395-241111-2-git-send-email-wangnan0@huawei.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: 896 Lines: 20 On Wed, Apr 01, 2015 at 10:33:12AM +0000, Wang Nan wrote: > According to man pages of libunwind, unwind hooks should return > 'negative value of one of the unw_error_t error-codes', they are > different from generic error code. In addition, access_dso_mem() > returns '!(size == sizeof(*data))', compiler never ensure it is > negative when failure, which causes libunwind get undesire value > when accessing //anon memory. > > This patch fixes this problem by force returning negative value when > error, instead of returning 'ret' itself when it is non-zero. hum, how about find_proc_info callback.. should it follow the same rules? thanks, jirka -- 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/