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] [day] [month] [year] [list]
Message-ID: <72356d9c-503b-d5e9-bc0b-2f31e3c49806@canonical.com>
Date:   Mon, 17 Jun 2019 14:43:47 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Ingo Molnar <mingo@...hat.com>, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: remove redundant assignment to pointer 'event'

On 17/06/2019 14:42, Steven Rostedt wrote:
> On Mon, 17 Jun 2019 13:37:22 +0100
> Colin King <colin.king@...onical.com> wrote:
> 
>> From: Colin Ian King <colin.king@...onical.com>
>>
>> The value assigned to pointer 'event' is never read and hence it
>> is redundant and can be removed.
>>
>> Addresses-Coverity: ("Unused value")
>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>> ---
>>  kernel/trace/trace_events_hist.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
>> index ca6b0dff60c5..0013b43d8b4d 100644
>> --- a/kernel/trace/trace_events_hist.c
>> +++ b/kernel/trace/trace_events_hist.c
>> @@ -1294,7 +1294,6 @@ static int __create_synth_event(int argc, const char *name, const char **argv)
>>  	event = alloc_synth_event(name, n_fields, fields);
>>  	if (IS_ERR(event)) {
>>  		ret = PTR_ERR(event);
>> -		event = NULL;
> 
> This is one of those cases where I rather not touch it.
> 
> Yeah, it may not be read, but assigning event to NULL isn't dangerous
> here. And if we change the code to expect event to be NULL or something
> real, it is better to keep this.

OK, makes sense.

> 
> -- Steve
> 
> 
> 
>>  		goto err;
>>  	}
>>  	ret = register_synth_event(event);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ