diff options
author | Yuchung Cheng <ycheng@google.com> | 2017-08-24 15:48:21 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-24 18:23:20 -0700 |
commit | 4e458debbb69af0cbde5bd6430d64519d5f59274 (patch) | |
tree | 4cac610ba1034740a055057d09f1b11197a22b71 /net | |
parent | c45182eb967af11e9482168be5be41aa22e5d321 (diff) | |
download | linux-4e458debbb69af0cbde5bd6430d64519d5f59274.tar.bz2 |
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 <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Craig Gallek <kraig@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Lawrence Brakmo <brakmo@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 6280a602604c..8eb81e5fae08 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; |