lkml.org 
[lkml]   [2012]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [RFC PATCH] namespaces: fix leak on fork() failure
Oleg Nesterov <oleg@redhat.com> writes:

> On 04/29, Eric W. Biederman wrote:
>>
>> Oleg Nesterov <oleg@redhat.com> writes:
>>
>> > On 04/29, Eric W. Biederman wrote:
>> >>
>> >> There are crazy code paths like daemonize()
>> >
>> > Forget. It has no callers anymore, should be killed. A user-space process
>> > should never use kernel_thread() and thus daemonize() is not needed.
>>
>> Good point. Oleg do you think you can send in the patches to kill
>> daemonize.
>
> Yes, will do. I am waiting until the last user in arch/powerpc goes
> away, the patch is already in mm.

Well I don't quite know what the path was but it looks like that change
has already hit Linus's tree:


commit 37ef9bd48af6ab9a3d1fd28df4f929abc19f2cc3
Author: Oleg Nesterov <oleg@redhat.com>
Date: Wed Mar 28 12:20:57 2012 +0000

powerpc/eeh: Remove eeh_event_handler()->daemonize()

daemonize() is only needed when a user-space task does kernel_thread().

eeh_event_handler() thread is created by the worker kthread, and thus it
doesn't need the soon-to-be-deprecated daemonize().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index 4a47525..92dd84c 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -59,7 +59,7 @@ static int eeh_event_handler(void * dummy)
struct eeh_event *event;
struct eeh_dev *edev;

- daemonize("eehd");
+ set_task_comm(current, "eehd");
set_current_state(TASK_INTERRUPTIBLE);

spin_lock_irqsave(&eeh_eventlist_lock, flags);

Eric


\
 
 \ /
  Last update: 2012-05-02 20:01    [W:0.079 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site