Commit 2797aec2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Hutchings
Browse files

netfilter: ipset: Fix an error code in ip_set_sockfn_get()



commit 30b7244d upstream.

The copy_to_user() function returns the number of bytes remaining to be
copied.  In this code, that positive return is checked at the end of the
function and we return zero/success.  What we should do instead is
return -EFAULT.

Fixes: a7b4f989 ("netfilter: ipset: IP set core support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 0f1cd1a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment