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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 13 Apr 2012 11:41:43 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Oleg Nesterov <oleg@...hat.com>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Howells <dhowells@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alexander Gordeev <agordeev@...hat.com>,
	Chris Zankel <chris@...kel.net>,
	David Smith <dsmith@...hat.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Larry Woodman <lwoodman@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] genirq: reimplement exit_irq_thread() hook via
 task_work_queue()

On Thu, 12 Apr 2012, Oleg Nesterov wrote:

> exit_irq_thread() and task->irq_thread are needed to handle
> the unexpected (and unlikely) exit of irq-thread.
> 
> We can use task_work instead and make this all private to
> kernel/irq/manage.c, simplification plus micro-optimization.
> 
> 1. rename exit_irq_thread() to irq_thread_dtor(), make it
>    static, and move it up before irq_thread().
> 
> 2. change irq_thread() to do task_queue_work(irq_thread_dtor)
>    at the start and task_work_cancel() before return.
> 
>    tracehook_notify_resume() can never play with kthreads,
>    only do_exit()->exit_task_work() can call the callback
>    and this is what we want.
> 
> 3. remove task_struct->irq_thread and the special hook
>    in do_exit().
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  include/linux/interrupt.h |    4 --
>  include/linux/sched.h     |   10 +-----
>  kernel/exit.c             |    2 -
>  kernel/irq/manage.c       |   69 +++++++++++++++++++++-----------------------
>  4 files changed, 35 insertions(+), 50 deletions(-)

Nice cleanup.

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
--
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