Re: [PATCH] splice, net: Fix splice_to_socket() for O_NONBLOCK socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 24, 2023 at 12:12 PM David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Jan Stancek <jstancek@xxxxxxxxxx> wrote:
>
> > LTP sendfile07 [1], which expects sendfile() to return EAGAIN when
> > transferring data from regular file to a "full" O_NONBLOCK socket,
> > started failing after commit 2dc334f1a63a ("splice, net: Use
> > sendmsg(MSG_SPLICE_PAGES) rather than ->sendpage()").
> > sendfile() no longer immediately returns, but now blocks.
> >
> > Removed sock_sendpage() handled this case by setting a MSG_DONTWAIT
> > flag, fix new splice_to_socket() to do the same for O_NONBLOCK sockets.
>
> Does this actually work correctly in all circumstances?
>
> The problem might come if you have a splice from a non-rewindable source
> through a temporary pipe (eg. sendfile() using splice_direct_to_actor()).

I assumed this was safe, since sendfile / splice_direct_to_actor()
requires input to be seekable.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux