Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2020-05-09 The following pull-request contains BPF updates for your *net* tree. We've added 4 non-merge commits during the last 9 day(s) which contain a total of 4 files changed, 11 insertions(+), 6 deletions(-). The main changes are: 1) Fix msg_pop_data() helper incorrectly setting an sge length in some cases as well as fixing bpf_tcp_ingress() wrongly accounting bytes in sg.size, from John Fastabend. 2) Fix to return an -EFAULT error when copy_to_user() of the value fails in map_lookup_and_delete_elem(), from Wei Yongjun. 3) Fix sk_psock refcnt leak in tcp_bpf_recvmsg(), from Xiyu Yang. ==================== Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@ -1485,8 +1485,10 @@ static int map_lookup_and_delete_elem(union bpf_attr *attr)
|
||||
if (err)
|
||||
goto free_value;
|
||||
|
||||
if (copy_to_user(uvalue, value, value_size) != 0)
|
||||
if (copy_to_user(uvalue, value, value_size) != 0) {
|
||||
err = -EFAULT;
|
||||
goto free_value;
|
||||
}
|
||||
|
||||
err = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user