lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y5nupici.fsf@sejong.aot.lge.com>
Date:	Mon, 11 Jun 2012 13:45:17 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Shan Wei <shanwei88@...il.com>
Cc:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
	acme@...stprotocols.net, namhyung.kim@....com,
	Kernel-Maillist <linux-kernel@...r.kernel.org>,
	Samuel Liao <samuelliao@...cent.com>
Subject: Re: [Perf bug-fix] check null of sym pointer before using it

Hi,

On Mon, 11 Jun 2012 10:07:10 +0800, Shan Wei wrote:
> ping.....
>
> It's a obvious function bug.....
>
> Shan Wei said, at 2012/6/5 13:14:
>
>> From: Samuel Liao <samuelliao@...cent.com>
>> 
>> Sometimes, sym will be null that causing perf crash.
>> 
>> Signed-off-by: Shan Wei <davidshan@...cent.com>

Reviewed-by: Namhyung Kim <namhyung@...nel.org>

Thanks for the fix.
Namhyung


>> ---
>>  tools/perf/ui/browsers/annotate.c |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>> 
>> diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
>> index 4deea6a..50873a8 100644
>> --- a/tools/perf/ui/browsers/annotate.c
>> +++ b/tools/perf/ui/browsers/annotate.c
>> @@ -814,7 +814,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
>>  {
>>  	struct disasm_line *pos, *n;
>>  	struct annotation *notes;
>> -	const size_t size = symbol__size(sym);
>> +	size_t size;
>>  	struct map_symbol ms = {
>>  		.map = map,
>>  		.sym = sym,
>> @@ -834,6 +834,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
>>  	if (sym == NULL)
>>  		return -1;
>>  
>> +	size = symbol__size(sym);
>> +
>>  	if (map->dso->annotate_warned)
>>  		return -1;
>>  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ