LoongArch: Fix return value underflow in exception path
authorWANG Rui <wangrui@loongson.cn>
Fri, 28 Jul 2023 02:30:42 +0000 (10:30 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 28 Jul 2023 02:30:42 +0000 (10:30 +0800)
commite66d511fc92201ba481392e54896f1aeadfcf0e9
tree4e520ef70f54e959e6ffd4c523b4c9f4dbf706cd
parent83da30d73b86ab5898fb84f8b49c11557c3fcc67
LoongArch: Fix return value underflow in exception path

This patch fixes an underflow issue in the return value within the
exception path, specifically at .Llt8 when the remaining length is less
than 8 bytes.

Cc: stable@vger.kernel.org
Fixes: 8941e93ca590 ("LoongArch: Optimize memory ops (memset/memcpy/memmove)")
Reported-by: Weihao Li <liweihao@loongson.cn>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/lib/clear_user.S
arch/loongarch/lib/copy_user.S