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: <548770E6.7040002@kernel.dk>
Date:	Tue, 09 Dec 2014 15:00:06 -0700
From:	Jens Axboe <axboe@...nel.dk>
To:	Steven Rostedt <rostedt@...dmis.org>,
	Arianna Avanzini <avanzini.arianna@...il.com>
CC:	namhyung@...nel.org, mingo@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2] trace, blktrace: don't let the sysfs interface
 remove trace from running list

On 11/13/2014 07:07 PM, Steven Rostedt wrote:
> 
> Jens (Cc'd) maintains the blktrace. He can take this if he wants.
> 
> -- Steve
> 
> 
> On Mon, 10 Nov 2014 11:40:49 +0100
> Arianna Avanzini <avanzini.arianna@...il.com> wrote:
> 
>> Currently, blktrace can be started/stopped via its ioctl-based interface
>> (used by the userspace blktrace tool) or via its ftrace interface. The
>> function blk_trace_remove_queue(), called each time an "enable" tunable
>> of the ftrace interface transitions to zero, removes the trace from the
>> running list, even if no function from the sysfs interface adds it to
>> such a list. This leads to a null pointer dereference.
>> This commit changes the blk_trace_remove_queue() function so that it
>> does not remove the blk_trace from the running list.
>>
>> v2:
>>     - Now the patch removes the invocation of list_del() instead of
>>       adding an useless if branch, as suggested by Namhyung Kim.
>>
>> Signed-off-by: Arianna Avanzini <avanzini.arianna@...il.com>
>> ---
>>  kernel/trace/blktrace.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
>> index c1bd4ad..bd05fd2 100644
>> --- a/kernel/trace/blktrace.c
>> +++ b/kernel/trace/blktrace.c
>> @@ -1493,9 +1493,6 @@ static int blk_trace_remove_queue(struct request_queue *q)
>>  	if (atomic_dec_and_test(&blk_probes_ref))
>>  		blk_unregister_tracepoints();
>>  
>> -	spin_lock_irq(&running_trace_lock);
>> -	list_del(&bt->running_list);
>> -	spin_unlock_irq(&running_trace_lock);
>>  	blk_trace_free(bt);
>>  	return 0;

Applied, thanks!

-- 
Jens Axboe

--
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