Skip to content

Commit

Permalink
bpf: sockmap, on update propagate errors back to userspace
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Fastabend authored and Daniel Borkmann committed May 16, 2018
1 parent 683d2ac commit e23afe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/bpf/sockmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e23afe5

Please sign in to comment.