On Thu, Jul 30, 2026, at 6:59 AM, Sabrina Dubroca wrote:
> 2026-07-26, 20:33:32 -0400, Chuck Lever wrote:
>> tls_sw_splice_read() currently derives its blocking behavior from
>> SPLICE_F_NONBLOCK alone; the socket's own O_NONBLOCK is invisible
>> to it. A splice(2) call without SPLICE_F_NONBLOCK on a nonblocking
>
> Is that needed?
>
> ssize_t do_splice(struct file *in, loff_t *off_in, struct file *out,
>               loff_t *off_out, size_t len, unsigned int flags)
> {
> [...]
>             if ((in->f_flags | out->f_flags) & O_NONBLOCK)
>                     flags |= SPLICE_F_NONBLOCK;
>
> We're not going through do_splice()?

That line is in the "ipipe && opipe" branch, which never involves a
socket. Splicing from a socket to a pipe takes the "else if (opipe)"
branch, and the test there is out->f_flags, the pipe's. The socket is
in, so its O_NONBLOCK is not folded into SPLICE_F_NONBLOCK on this
path.


-- 
Chuck Lever

Reply via email to