* [bpf-next PATCH] bpf: sockmap, on update propagate errors back to userspace
@ 2018-05-16 23:38 John Fastabend
2018-05-16 23:50 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: John Fastabend @ 2018-05-16 23:38 UTC (permalink / raw)
To: ast, daniel; +Cc: netdev
When an error happens in the update sockmap element logic also pass
the err up to the user.
Fixes: e5cd3abcb31a ("bpf: sockmap, refactor sockmap routines to work with hashmap")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
kernel/bpf/sockmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 79f5e89..c6de139 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -1875,7 +1875,7 @@ static int sock_map_ctx_update_elem(struct bpf_sock_ops_kern *skops,
write_unlock_bh(&osock->sk_callback_lock);
}
out:
- return 0;
+ return err;
}
int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [bpf-next PATCH] bpf: sockmap, on update propagate errors back to userspace
2018-05-16 23:38 [bpf-next PATCH] bpf: sockmap, on update propagate errors back to userspace John Fastabend
@ 2018-05-16 23:50 ` Daniel Borkmann
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2018-05-16 23:50 UTC (permalink / raw)
To: John Fastabend, ast; +Cc: netdev
On 05/17/2018 01:38 AM, John Fastabend wrote:
> When an error happens in the update sockmap element logic also pass
> the err up to the user.
>
> Fixes: e5cd3abcb31a ("bpf: sockmap, refactor sockmap routines to work with hashmap")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Agree, applied to bpf-next, thanks John!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-16 23:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 23:38 [bpf-next PATCH] bpf: sockmap, on update propagate errors back to userspace John Fastabend
2018-05-16 23:50 ` Daniel Borkmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.