Re: [PATCH] riscv: Return -EFAULT if copy_to_user() failed in signal.c

2021-03-03 Thread Tiezhu Yang
On 03/02/2021 06:01 PM, Ben Dooks wrote: On 02/03/2021 07:28, Tiezhu Yang wrote: copy_to_user() returns the amount left to copy, it should return -EFAULT if copy to user failed. This looks technically correct, but the caller (only one) will check for non-zero and will covert that to -EFAULT

Re: [PATCH] riscv: Return -EFAULT if copy_to_user() failed in signal.c

2021-03-02 Thread Ben Dooks
On 02/03/2021 07:28, Tiezhu Yang wrote: copy_to_user() returns the amount left to copy, it should return -EFAULT if copy to user failed. This looks technically correct, but the caller (only one) will check for non-zero and will covert that to -EFAULT in setup_rt_frame(). I expect if this

[PATCH] riscv: Return -EFAULT if copy_to_user() failed in signal.c

2021-03-02 Thread Tiezhu Yang
copy_to_user() returns the amount left to copy, it should return -EFAULT if copy to user failed. Signed-off-by: Tiezhu Yang --- arch/riscv/kernel/signal.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index