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]
Date:	Fri, 22 May 2009 08:42:44 +0800
From:	"Zhaolei" <zhaolei@...fujitsu.com>
To:	"Oleg Nesterov" <oleg@...hat.com>
Cc:	"Frederic Weisbecker" <fweisbec@...il.com>,
	"Steven Rostedt" <rostedt@...dmis.org>,
	"Ingo Molnar" <mingo@...e.hu>, "Tom Zanussi" <tzanussi@...il.com>,
	"LKML" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tracing/workqueue: Get rid of searching last executedworklet in probe_worklet_complete()

* From: "Oleg Nesterov" <oleg@...hat.com>
> On 05/21, Zhaolei wrote:
>>
>> We don't need search workqueue's worklet list for worklet which was latest
>> executed, instead, we can use a pointer in cpu_workqueue_stats to remember
>> which worklet was just executed.
> 
> Minor nit,
> 
>> @@ -192,22 +192,11 @@ probe_worklet_complete(struct task_struct *wq_thread, void *work)
>>  goto end;
>>
>>  found_wq:
>> - list_for_each_entry(wfnode, &node->workfunclist, list) {
>> - u64 executed_time;
>> + executed_time = trace_clock_global() - node->last_workfunc->start_time;
>> + node->last_workfunc->total_time += executed_time;
> 
> Suppose that "enqueue" handler fails to allocate the memory for the new
> work_struct.
> 
> This means that the "execute" handler does not record ->last_workfunc.
> 
> In that case probe_worklet_complete() uses the wrong workfunc_stats or
> we can even crash if ->last_workfunc == NULL.
> 
> I think _execute() should set ->last_workfunc = NULL first, then serach
> for wfnode. _complete() should check ->last_workfunc != NULL and return
> if it is NULL.
Hello, Oleg

Thanks!
You are right, I will send v2 to fix this.

Zhaolei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ