Commit 72862e65 authored by Wang Qing's avatar Wang Qing Committed by Zheng Zengkai
Browse files

arc: kernel: Return -EFAULT if copy_to_user() fails



stable inclusion
from stable-5.10.32
commit b448a6a2fc5aa7c36403ebfb2dcbf767d3b01eb4
bugzilla: 51796

--------------------------------

[ Upstream commit 46e15218 ]

The copy_to_user() function returns the number of bytes remaining to be
copied, but we want to return -EFAULT if the copy doesn't complete.

Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent a3f0b556
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment