From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265171AbUEZEuQ (ORCPT ); Wed, 26 May 2004 00:50:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265165AbUEZEuQ (ORCPT ); Wed, 26 May 2004 00:50:16 -0400 Received: from gate.crashing.org ([63.228.1.57]:34440 "EHLO gate.crashing.org") by vger.kernel.org with ESMTP id S265155AbUEZEuL (ORCPT ); Wed, 26 May 2004 00:50:11 -0400 Subject: Re: [PATCH] ppc64: Fix possible race with set_pte on a present PTE From: Benjamin Herrenschmidt To: Linus Torvalds Cc: "David S. Miller" , wesolows@foobazco.org, willy@debian.org, Andrea Arcangeli , Andrew Morton , Linux Kernel list , mingo@elte.hu, bcrl@kvack.org, linux-mm@kvack.org, Linux Arch list In-Reply-To: References: <1085369393.15315.28.camel@gaston> <1085371988.15281.38.camel@gaston> <1085373839.14969.42.camel@gaston> <20040525034326.GT29378@dualathlon.random> <20040525114437.GC29154@parcelfarce.linux.theplanet.co.uk> <20040525153501.GA19465@foobazco.org> <20040525102547.35207879.davem@redhat.com> <20040525105442.2ebdc355.davem@redhat.com> <1085521251.24948.127.camel@gaston> <1085522860.15315.133.camel@gaston> <1085530867.14969.143.camel@gaston> <1085541906.14969.412.camel@gaston> Content-Type: text/plain Message-Id: <1085546780.5584.19.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 26 May 2004 14:46:20 +1000 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Ok, your patch just missed the do_wp_page() case which needs the same medication as break_cow(), which leaves us with only one caller of ptep_establish... the one which just sets those 2 bits and shouldn't be named ptep establish at all ;) What do we do ? I'd rather have ptep_establish do the ptep_clear_flush & set_pte, and the later just do the bit flip, but then, the arch (and possibly generic) implementation of that bit flip must also do the TLB flush when necessary (it's not on ppc). Ben.