Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756675Ab2HZCJv (ORCPT ); Sat, 25 Aug 2012 22:09:51 -0400 Received: from mx2.parallels.com ([64.131.90.16]:50582 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754737Ab2HZCJt (ORCPT ); Sat, 25 Aug 2012 22:09:49 -0400 Message-ID: <503984AB.6030802@parallels.com> Date: Sat, 25 Aug 2012 22:06:35 -0400 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Andrew Morton CC: , , "Peter Zijlstra" , Frederic Weisbecker , Thomas Gleixner , Tony Luck , Fenghua Yu Subject: Re: [PATCH v2] fork: fix oops after fork failure References: <1345736168-1990-1-git-send-email-glommer@parallels.com> <20120824150804.8e3c4b7e.akpm@linux-foundation.org> In-Reply-To: <20120824150804.8e3c4b7e.akpm@linux-foundation.org> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [32.167.60.109] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 28 On 08/24/2012 06:08 PM, Andrew Morton wrote: > On Thu, 23 Aug 2012 19:36:08 +0400 > Glauber Costa 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! > I am basing all my patches against mmotm (actually, Michal's git copy of it...) I might have missed one spin, though. It happens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/