Skip to content
Commit 30b7244d authored by Dan Carpenter's avatar Dan Carpenter Committed by Jozsef Kadlecsik
Browse files

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



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>
parent 3da09663
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment