Home
last modified time | relevance | path

Searched hist:c1d7cd22 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/arm64/include/asm/
H A Dspinlock.hc1d7cd22 Tue Jul 28 08:48:00 CDT 2015 Will Deacon <will.deacon@arm.com> arm64: spinlock: fix ll/sc unlock on big-endian systems

When unlocking a spinlock, we perform a read-modify-write on the owner
ticket in order to increment it and store it back with release
semantics.

In the LL/SC case, we load the 16-bit ticket using a 32-bit load and
therefore store back the wrong halfword on a big-endian system,
corrupting the lock after the first unlock and killing the system dead.

This patch fixes the unlock code to use 16-bit accessors consistently.

Signed-off-by: Will Deacon <will.deacon@arm.com>
c1d7cd22 Tue Jul 28 08:48:00 CDT 2015 Will Deacon <will.deacon@arm.com> arm64: spinlock: fix ll/sc unlock on big-endian systems

When unlocking a spinlock, we perform a read-modify-write on the owner
ticket in order to increment it and store it back with release
semantics.

In the LL/SC case, we load the 16-bit ticket using a 32-bit load and
therefore store back the wrong halfword on a big-endian system,
corrupting the lock after the first unlock and killing the system dead.

This patch fixes the unlock code to use 16-bit accessors consistently.

Signed-off-by: Will Deacon <will.deacon@arm.com>