Re: [RFC][PATCH] af_key: return error when meet errors on sendmsg() syscall

2014-05-12 Thread David Miller
From: Xufeng Zhang Date: Mon, 12 May 2014 14:05:09 +0800 > I know what you mean, but isn't the kernel API aimed to facilitate the > implementation of user space? Yes, but as I stated the communication is message oriented and this includes the errors. -- To unsubscribe from this list: send the li

Re: [RFC][PATCH] af_key: return error when meet errors on sendmsg() syscall

2014-05-11 Thread Xufeng Zhang
On 05/12/2014 01:11 PM, David Miller wrote: So it makes sense to return errors for send() syscall. Signed-off-by: Xufeng Zhang I disagree. If pfkey_error() is successful, the error will be reported in the AF_KEY message that is broadcast, there is no reason for sendmsg to return an err

Re: [RFC][PATCH] af_key: return error when meet errors on sendmsg() syscall

2014-05-11 Thread David Miller
From: Xufeng Zhang Date: Fri, 9 May 2014 13:47:35 +0800 > Current implementation for pfkey_sendmsg() always return success > no matter whether or not error happens during this syscall, > this is incompatible with the general send()/sendmsg() API: > man send > RETURN VALUE > On success