diff options
-rw-r--r-- | fs/splice.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c index 801c21cd77fe..22adbbe51e52 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -809,6 +809,13 @@ static int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_des */ static int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd) { + /* + * Check for signal early to make process killable when there are + * always buffers available + */ + if (signal_pending(current)) + return -ERESTARTSYS; + while (!pipe->nrbufs) { if (!pipe->writers) return 0; |