From: Yuchung Cheng Date: Thu, 24 Aug 2017 22:48:21 +0000 (-0700) Subject: bpf: fix bpf_setsockopts return value X-Git-Tag: v4.14-rc1~190^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e458debbb69af0cbde5bd6430d64519d5f59274;p=platform%2Fkernel%2Flinux-rpi.git bpf: fix bpf_setsockopts return value This patch fixes a bug causing any sock operations to always return EINVAL. Fixes: a5192c52377e ("bpf: fix to bpf_setsockops"). Reported-by: Neal Cardwell Signed-off-by: Yuchung Cheng Acked-by: Neal Cardwell Acked-by: Craig Gallek Acked-by: Daniel Borkmann Acked-by: Lawrence Brakmo Signed-off-by: David S. Miller --- diff --git a/net/core/filter.c b/net/core/filter.c index 6280a60..8eb81e5 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2872,7 +2872,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, ret = -EINVAL; } } - ret = -EINVAL; #endif } else { ret = -EINVAL;