diff options
author | 2025-05-23 19:17:05 +0100 | |
---|---|---|
committer | 2025-05-23 13:25:02 -0700 | |
commit | 079e5c56a5c41d285068939ff7b0041ab10386fa (patch) | |
tree | 564e2b77b6d0704b39d1d04e009586dfb8ebb0b8 /include | |
parent | Merge branch 'allow-mmap-of-sys-kernel-btf-vmlinux' (diff) | |
download | wireguard-linux-079e5c56a5c41d285068939ff7b0041ab10386fa.tar.xz wireguard-linux-079e5c56a5c41d285068939ff7b0041ab10386fa.zip |
bpf: Fix error return value in bpf_copy_from_user_dynptr
On error, copy_from_user returns number of bytes not copied to
destination, but current implementation of copy_user_data_sleepable does
not handle that correctly and returns it as error value, which may
confuse user, expecting meaningful negative error value.
Fixes: a498ee7576de ("bpf: Implement dynptr copy kfuncs")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250523181705.261585-1-mykyta.yatsenko5@gmail.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions