summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-04-03 17:41:40 +0100
committerBen Hutchings <ben@decadent.org.uk>2017-07-18 18:40:32 +0100
commit8420ce64f56cded96e80ef38b5e28463cfaade58 (patch)
tree0136d86f9b473da9b137499272a5c90916e640a4 /kernel/locking
parentb66d946ed03dea6e1dd925982b1c1baa4f1963b0 (diff)
metag/usercopy: Fix src fixup in from user rapf loops
commit 2c0b1df88b987a12d95ea1d6beaf01894f3cc725 upstream. The fixup code to rewind the source pointer in __asm_copy_from_user_{32,64}bit_rapf_loop() always rewound the source by a single unit (4 or 8 bytes), however this is insufficient if the fault didn't occur on the first load in the loop, as the source pointer will have been incremented but nothing will have been stored until all 4 register [pairs] are loaded. Read the LSM_STEP field of TXSTATUS (which is already loaded into a register), a bit like the copy_to_user versions, to determine how many iterations of MGET[DL] have taken place, all of which need rewinding. Fixes: 373cd784d0fc ("metag: Memory handling") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-metag@vger.kernel.org Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel/locking')
0 files changed, 0 insertions, 0 deletions