aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-05-16 16:38:14 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-17 01:48:22 +0200
commite23afe5e7cba89cd0744c5218eda1b3553455c17 (patch)
tree5ea1134af3e5279de76b6f46a631311c4dffd17c /kernel
parentbpf: fix sock hashmap kmalloc warning (diff)
downloadlinux-dev-e23afe5e7cba89cd0744c5218eda1b3553455c17.tar.xz
linux-dev-e23afe5e7cba89cd0744c5218eda1b3553455c17.zip
bpf: sockmap, on update propagate errors back to userspace
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> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/sockmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 79f5e8988889..c6de1393df63 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)