Thread (8 messages) 8 messages, 4 authors, 2017-06-23

Re: [PATCH -net] tls: return -EFAULT if copy_to_user() fails

From: Dan Carpenter <hidden>
Date: 2017-06-23 11:29:01
Also in: kernel-janitors

On Fri, Jun 23, 2017 at 03:58:35AM -0700, Joe Perches wrote:
getsockopt says:

For getsockopt(), optlen is a value-result argument, initially containing the size
of the buffer pointed to by optval, and modified on return to indicate the actual
size of the value returned
In the original code, it's not returning the "actual size of the value
returned". It's returning a smaller or equal value... The man page is
correct that this is how some getsockopts work, of course.  But here
-EFAULT is expected.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help