diff options
| author | Jianlin Shi <shijianlin11@foxmail.com> | 2026-08-23 22:17:26 +0800 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-08-23 20:45:21 +0200 |
| commit | 16790357a50baae10de1f619b608a85145d54bc2 (patch) | |
| tree | 545cf3fae7a32eccee03d376da468786c3bcaee2 /scripts/Makefile.thinlto | |
| parent | effa6370ba89e7839c9bfeb802d8f05d6843ddf1 (diff) | |
| download | linux-next-16790357a50baae10de1f619b608a85145d54bc2.tar.gz linux-next-16790357a50baae10de1f619b608a85145d54bc2.zip | |
bpf: Return partial progress from bpf_stream_read on fault
bpf_stream_read() pops and frees stream elements after a successful
copy_to_user(). If a later copy_to_user() fails, it currently restores
only the current element's consumed_len and returns -EFAULT, hiding
bytes already delivered to userspace and making the consumed data
unrecoverable on retry.
On a short copy, keep the successfully copied prefix of the current
element and return the number of bytes copied. Return -EFAULT only when
no bytes were copied for the call.
Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams")
Signed-off-by: Jianlin Shi <shijianlin11@foxmail.com>
Link: https://lore.kernel.org/r/7668c5838c6beafeea719df8d55319e2fe08cfef.1787492521.git.shijianlin11@foxmail.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
