Re: [PATCH 5.0 047/246] fs: Make splice() and tee() take into account O_NONBLOCK flag on pipes
From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Thu Apr 04 2019 - 13:32:05 EST
On Thu, Apr 04, 2019 at 04:16:57PM +0000, Slavomir Kaslev wrote:
> On Thu, 2019-04-04 at 10:45 +0200, Greg Kroah-Hartman wrote:
> > 5.0-stable review patch. If anyone has any objections, please let me
> > know.
> >
> > ------------------
> >
> > [ Upstream commit ee5e001196d1345b8fee25925ff5f1d67936081e ]
> >
> > The current implementation of splice() and tee() ignores O_NONBLOCK
> > set
> > on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag
> > for
> > blocking on pipe arguments. This is inconsistent since splice()-ing
> > from/to non-pipe file descriptors does take O_NONBLOCK into
> > consideration.
> >
> > Fix this by promoting O_NONBLOCK, when set on a pipe, to
> > SPLICE_F_NONBLOCK.
>
> [...]
>
> > This change does have potential of breaking users who don't expect
> > EAGAIN from splice() when SPLICE_F_NONBLOCK is not set. OTOH
> > programs
> > that set O_NONBLOCK and don't anticipate EAGAIN are arguably
> > buggy[2].
>
> Hi Greg,
>
> Can you drop this one from the stable queues? We discussed it with
> Sasha[1] already in the autosel patches thread.
>
> [1] https://lkml.org/lkml/2019/4/3/811
Dropped from everywhere now.
Sasha, how did this still get in?
greg k-h