lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: cgroup_release_agent() with call_usermodehelper() with UMH_WAIT_EXEC may crash
On Fri, Feb 3, 2012 at 8:04 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> Can't we simply move that code into flush_old_exec() ? (wrapped into
> the new helper).

Sure. It would kind of make sense to do it as part of exec_mmap().
That's what associates us with the new mm, after all.

That said, I think my *preferred* approach would be to still do the final

set_task_comm(current, tcomm);

in setup_new_exec(), because that's really when we set up the new mm.

So my preferred solution would be to simply move the "char tcomm[];"
array from the stack (currently automatic in setup_new_exec()) into
the struct linux_binprm, and then copy it from the filename early. We
could copy it arbitrarily early, perhaps in "prepare_binprm()".

Hmm?

Linus


\
 
 \ /
  Last update: 2012-02-03 17:51    [W:3.081 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site