* [PATCH net] bpf: fix bpf_setsockopts return value
@ 2017-08-24 22:48 Yuchung Cheng
2017-08-24 23:37 ` Daniel Borkmann
2017-08-25 1:24 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Yuchung Cheng @ 2017-08-24 22:48 UTC (permalink / raw)
To: davem, brakmo; +Cc: ncardwell, cgallek, netdev, Yuchung Cheng
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>
---
net/core/filter.c | 1 -
1 file changed, 1 deletion(-)
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;
--
2.14.1.342.g6490525c54-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] bpf: fix bpf_setsockopts return value
2017-08-24 22:48 [PATCH net] bpf: fix bpf_setsockopts return value Yuchung Cheng
@ 2017-08-24 23:37 ` Daniel Borkmann
2017-08-24 23:45 ` Lawrence Brakmo
2017-08-25 1:24 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2017-08-24 23:37 UTC (permalink / raw)
To: Yuchung Cheng, davem, brakmo; +Cc: ncardwell, cgallek, netdev
On 08/25/2017 12:48 AM, Yuchung Cheng wrote:
> 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>
Ohh well, thanks for the fix!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bpf: fix bpf_setsockopts return value
2017-08-24 23:37 ` Daniel Borkmann
@ 2017-08-24 23:45 ` Lawrence Brakmo
0 siblings, 0 replies; 4+ messages in thread
From: Lawrence Brakmo @ 2017-08-24 23:45 UTC (permalink / raw)
To: Daniel Borkmann, Yuchung Cheng, davem@davemloft.net
Cc: ncardwell@google.com, cgallek@google.com, netdev@vger.kernel.org
On 8/24/17, 4:37 PM, "Daniel Borkmann" <daniel@iogearbox.net> wrote:
On 08/25/2017 12:48 AM, Yuchung Cheng wrote:
> 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>
Ohh well, thanks for the fix!
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Thanks! I never checked return values in by bpf test programs
Acked-by: Lawrence Brakmo <brakmo@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bpf: fix bpf_setsockopts return value
2017-08-24 22:48 [PATCH net] bpf: fix bpf_setsockopts return value Yuchung Cheng
2017-08-24 23:37 ` Daniel Borkmann
@ 2017-08-25 1:24 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-08-25 1:24 UTC (permalink / raw)
To: ycheng; +Cc: brakmo, ncardwell, cgallek, netdev
From: Yuchung Cheng <ycheng@google.com>
Date: Thu, 24 Aug 2017 15:48:21 -0700
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-25 1:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 22:48 [PATCH net] bpf: fix bpf_setsockopts return value Yuchung Cheng
2017-08-24 23:37 ` Daniel Borkmann
2017-08-24 23:45 ` Lawrence Brakmo
2017-08-25 1:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).