summaryrefslogtreecommitdiff
path: root/init/initramfs.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-04-04 10:43:26 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-12 10:41:13 (GMT)
commit4f3f0dd2a75b3a25198492cd815ea82de9cef8a7 (patch)
treee2443e91c2768650e654a9b622c26c806a0a7f2e /init/initramfs.c
parent3dc0fe517a9fb44f6c45cbb787cc4bdf5e9a3d0f (diff)
downloadlinux-4f3f0dd2a75b3a25198492cd815ea82de9cef8a7.tar.xz
metag/usercopy: Set flags before ADDZ
commit fd40eee1290ad7add7aa665e3ce6b0f9fe9734b4 upstream. 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 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init/initramfs.c')
0 files changed, 0 insertions, 0 deletions