Commit 4e458deb authored by Yuchung Cheng's avatar Yuchung Cheng Committed by David S. Miller

bpf: fix bpf_setsockopts return value

This patch fixes a bug causing any sock operations to always return EINVAL.

Fixes: a5192c52 ("bpf: fix to bpf_setsockops").
Reported-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Acked-by: default avatarCraig Gallek <kraig@google.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarLawrence Brakmo <brakmo@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c45182eb
...@@ -2872,7 +2872,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock, ...@@ -2872,7 +2872,6 @@ BPF_CALL_5(bpf_setsockopt, struct bpf_sock_ops_kern *, bpf_sock,
ret = -EINVAL; ret = -EINVAL;
} }
} }
ret = -EINVAL;
#endif #endif
} else { } else {
ret = -EINVAL; ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment