]> git.baikalelectronics.ru Git - kernel.git/commit
splice: reinstate SIGPIPE/EPIPE handling
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Dec 2016 18:59:34 +0000 (10:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 21 Dec 2016 18:59:34 +0000 (10:59 -0800)
commit2ba24de967e1a337e9aa325b2f409c9c13b25df0
treee4ca6d2e8d2e64b54a50fa3bf5995c676e2f7d49
parent7b5473b6ec584eae11865fec44ead0298c1a7033
splice: reinstate SIGPIPE/EPIPE handling

Commit bcaec92d4bf7 ("splice: lift pipe_lock out of splice_to_pipe()")
caused a regression when there were no more readers left on a pipe that
was being spliced into: rather than the expected SIGPIPE and -EPIPE
return value, the writer would end up waiting forever for space to free
up (which obviously was not going to happen with no readers around).

Fixes: bcaec92d4bf7 ("splice: lift pipe_lock out of splice_to_pipe()")
Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org>
Debugged-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org # v4.9
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/splice.c