[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0806190928100.2907@woody.linux-foundation.org>
Date: Thu, 19 Jun 2008 09:30:20 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...e.hu>
cc: Jeremy Fitzhardinge <jeremy@...p.org>, benh@...nel.crashing.org,
xen-devel <xen-devel@...ts.xensource.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
kvm-devel <kvm-devel@...ts.sourceforge.net>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>,
Virtualization Mailing List <virtualization@...ts.osdl.org>,
Hugh Dickins <hugh@...itas.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 1 of 4] mm: add a ptep_modify_prot transaction
abstraction
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists