From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761515AbYFSQcT (ORCPT ); Thu, 19 Jun 2008 12:32:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760162AbYFSQcB (ORCPT ); Thu, 19 Jun 2008 12:32:01 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54644 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbYFSQcA (ORCPT ); Thu, 19 Jun 2008 12:32:00 -0400 Date: Thu, 19 Jun 2008 09:30:20 -0700 (PDT) From: Linus Torvalds To: Ingo Molnar cc: Jeremy Fitzhardinge , benh@kernel.crashing.org, xen-devel , Peter Zijlstra , kvm-devel , x86@kernel.org, LKML , Virtualization Mailing List , Hugh Dickins , Thomas Gleixner Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction abstraction In-Reply-To: <20080619115832.GM15228@elte.hu> Message-ID: References: <1213831403.8011.24.camel@pasglop> <4859A149.9090004@goop.org> <4859A528.1010107@goop.org> <4859AA47.2020903@goop.org> <20080619115832.GM15228@elte.hu> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Jun 2008, Ingo Molnar wrote: > > Below is the commit, it needed a small amount of massaging to apply the > void * -> unsigned long * change in the x86/bitops topic. Well, that's your bug right there. The macros very much depended on the pointers being "void *", due to the pointer arithmetic (which is a gcc extension that we use extensively - "void *" arithmetic works as if it was a byte pointer). When you changed "addr" to "volatile unsigned long *", now the arithmetic ended up multiplying the offset by the size of "long" before adding it. That said, the _original_ patch wasn't tested either, but quite frankly, looking over the patch one more time, I can't really see how it could break. Linus