netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).