Skip to content

Commit e23afe5

Browse files
jrfastabborkmann
authored andcommitted
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: e5cd3ab ("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>
1 parent 683d2ac commit e23afe5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/bpf/sockmap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ static int sock_map_ctx_update_elem(struct bpf_sock_ops_kern *skops,
18751875
write_unlock_bh(&osock->sk_callback_lock);
18761876
}
18771877
out:
1878-
return 0;
1878+
return err;
18791879
}
18801880

18811881
int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type)

0 commit comments

Comments
 (0)