diff options
author | Will Deacon <will.deacon@arm.com> | 2015-10-15 13:55:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-11-09 14:33:39 -0800 |
commit | 599f528a90026dd61533aa5145e64cc0ac3625ae (patch) | |
tree | e11e25a8bf4c16f2f9d7112c3e10f9477469c849 /crypto/crct10dif_generic.c | |
parent | dbf2a8c020446889a5214c3f91fd69442cd2cd86 (diff) |
arm64: compat: fix stxr failure case in SWP emulation
commit 589cb22bbedacf325951014c07a35a2b01ca57f6 upstream.
If the STXR instruction fails in the SWP emulation code, we leave *data
overwritten with the loaded value, therefore corrupting the data written
by a subsequent, successful attempt.
This patch re-jigs the code so that we only write back to *data once we
know that the update has happened.
Fixes: bd35a4adc413 ("arm64: Port SWP/SWPB emulation support from arm")
Reported-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reported-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/crct10dif_generic.c')
0 files changed, 0 insertions, 0 deletions