[PATCH V2] powerpc: thp: Fix crash on mremap
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Feb 13 08:03:34 EST 2014
On Wed, 2014-02-12 at 06:23 -0800, Greg KH wrote:
> I have no idea what that means...
>
> If you want this patch applied, please be specific as to what is going
> on, why the code is _very_ different, and all of that. Make it
> _obvious_ as to what is happening, and why I would be a fool not to
> take
> it in the stable tree.
>
> As it is, the code in this patch looks so different that I'm just
> assuming you got something wrong and are trying to really send me
> something else, so I'll just ignore it.
It looks very different because the function that needs to be fixed
changed a lot upstream in 3.13.
In practice it's *not* very different in behaviour. It's just that
on powerpc we need to unconditionally call withdraw and deposit when
moving PTEs or it will crash, due to how we keep the transparent
huge page in sync with the hash table.
With the 3.13 code, due to lock breaking introduced by Kirill in
3.13-rc's, there's already a generic case for doing that (if we dropped
the lock). So we just changed the condition to essentially force the
condition to true to always do it under control of an arch helper.
The pre-3.13 code didn't do the withdraw and deposit at all in that
function however, so in that case, the patch (this 3.12 one) basically
just adds the calls to withdraw and deposit under control of an ifdef
which is only enabled for powerpc64.
So you are taking 0 risk with other architecture and as the powerpc
maintainer I'm happy with the patch.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list