From: Andrew Morton <akpm@linux-foundation.org>
To: Glauber Costa <glommer@parallels.com>
Cc: <linux-kernel@vger.kernel.org>, <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>
Subject: Re: [PATCH v2] fork: fix oops after fork failure
Date: Fri, 24 Aug 2012 15:08:04 -0700 [thread overview]
Message-ID: <20120824150804.8e3c4b7e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1345736168-1990-1-git-send-email-glommer@parallels.com>
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!
next prev parent reply other threads:[~2012-08-24 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 15:36 Glauber Costa
2012-08-23 16:04 ` Frederic Weisbecker
2012-08-24 22:08 ` Andrew Morton [this message]
2012-08-26 2:06 ` Glauber Costa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120824150804.8e3c4b7e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=a.p.zijlstra@chello.nl \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=glommer@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome