mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
net: Comment copy_from_sockptr() explaining its behaviour
copy_from_sockptr() has a history of misuse. Add a comment explaining that the function follows API of copy_from_user(), i.e. returns 0 for success, or number of bytes not copied on error. Signed-off-by: Michal Luczaj <mhal@rbox.co> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
0202005664
commit
49b2b97332
@ -53,6 +53,8 @@ static inline int copy_from_sockptr_offset(void *dst, sockptr_t src,
|
||||
/* Deprecated.
|
||||
* This is unsafe, unless caller checked user provided optlen.
|
||||
* Prefer copy_safe_from_sockptr() instead.
|
||||
*
|
||||
* Returns 0 for success, or number of bytes not copied on error.
|
||||
*/
|
||||
static inline int copy_from_sockptr(void *dst, sockptr_t src, size_t size)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user