https://github.com/torvalds/linux
Revision fd40eee1290ad7add7aa665e3ce6b0f9fe9734b4 authored by James Hogan on 04 April 2017, 10:43:26 UTC, committed by James Hogan on 05 April 2017, 14:25:06 UTC
The fixup code for the copy_to_user rapf loops reads TXStatus.LSM_STEP
to decide how far to rewind the source pointer. There is a special case
for the last execution of an MGETL/MGETD, since it leaves LSM_STEP=0
even though the number of MGETLs/MGETDs attempted was 4. This uses ADDZ
which is conditional upon the Z condition flag, but the AND instruction
which masked the TXStatus.LSM_STEP field didn't set the condition flags
based on the result.

Fix that now by using ANDS which does set the flags, and also marking
the condition codes as clobbered by the inline assembly.

Fixes: 373cd784d0fc ("metag: Memory handling")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Cc: stable@vger.kernel.org
1 parent 563ddc1
History
Tip revision: fd40eee1290ad7add7aa665e3ce6b0f9fe9734b4 authored by James Hogan on 04 April 2017, 10:43:26 UTC
metag/usercopy: Set flags before ADDZ
Tip revision: fd40eee

back to top