Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754811Ab1DKRpU (ORCPT ); Mon, 11 Apr 2011 13:45:20 -0400 Received: from mx2.parallels.com ([64.131.90.16]:58050 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318Ab1DKRpS (ORCPT ); Mon, 11 Apr 2011 13:45:18 -0400 Message-ID: <4DA33E1E.701@parallels.com> Date: Mon, 11 Apr 2011 12:45:02 -0500 From: Rob Landley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Alexey Dobriyan CC: "Serge E. Hallyn" , , , , Trond Myklebust , Tim Spriggs , Kir Kolyshkin , Pavel Emelyanov Subject: Re: [PATCH 3/3] Compare namespaces when comparing addresses in auth_unix cache. References: <4D9431B3.2070305@parallels.com> <20110405034641.GC6764@hallyn.com> <4D9F24F2.9020603@parallels.com> <4DA30222.5040902@parallels.com> <20110411133602.GA5321@hallyn.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [24.27.26.60] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1553 Lines: 34 On 04/11/2011 08:57 AM, Alexey Dobriyan wrote: > On Mon, Apr 11, 2011 at 4:36 PM, Serge E. Hallyn wrote: > >> Besides use-after-free, the other concern is an invalid net_eq() >> result due to the * being re-used for a new netns. > > Exactly. > > "struct net" dies last, no exceptions, anything different is a disaster. Actually the patch turns out to be irrelevant because Pavel made the whole thing into a pernet subsystem, so it was already fixed in a different way. (Commit 2f72c9b7. My bad, I initially started working against an NFS tree with an older kernel version, this fix was to a different source file so my patch still applied, and I just regression tested that it worked, not that it still failed without it. Just caught it now.) I actually did talk about addressing potential reuse of the net * in my email with Stanislav (point of the patch was to allow one cache to maintain two different contexts at the same time; a situation that changed the meaning of an existing cache entry by requiring the old context to go away didn't introduce any new problems that a single context didn't already have due to DNAT, servers moving, administrators changing credentials on the server). But sort of a moot point now. I believe the third patch can be dropped entirely. Rob -- 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/