lkml.org 
[lkml]   [2012]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] fork: fix oops after fork failure
On Thu, 23 Aug 2012 19:36:08 +0400
Glauber Costa <glommer@parallels.com> wrote:

> When we want to duplicate a new process, dup_task_struct() will undergo
> a series of allocations. If alloc_thread_info_node() fails, we call
> free_task_struct() and return.
>
> This seems right, but it is not. free_task_struct() will not only free
> the task struct from the kmem_cache, but will also call
> arch_release_task_struct(). The problem is that this function is
> supposed to undo whatever arch-specific work done by
> arch_dup_task_struct(), that is not yet called at this point. The
> particular problem I ran accross was that in x86, we will arrive at
> fpu_free() without having ever allocated it.

I think ths was already fixed by f19b9f74b7ea3b ("fork: fix error
handling in dup_task()"). As you would have noticed if you were
preparing patches against up-to-date kernel versions!



\
 
 \ /
  Last update: 2012-08-25 01:01    [W:0.053 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site