kconsumerd: fix infinite loop in splice handling of subbuf larger than 4k
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Aug 2011 13:18:36 +0000 (09:18 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Aug 2011 13:18:36 +0000 (09:18 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttngkconsumerd/lttngkconsumerd.c

index ba26026c4458cb955ce70a5c2727a8b3b7413e48..b6a533c1757dc5aee7006d66c2057460d98afdd9 100644 (file)
@@ -474,9 +474,7 @@ int lttng_kconsumerd_on_read_subbuffer_splice(
                        perror("Error in file splice");
                        goto splice_error;
                }
-               if (ret >= len) {
-                       len = 0;
-               }
+               len -= ret;
                /* This won't block, but will start writeout asynchronously */
                sync_file_range(outfd, kconsumerd_fd->out_fd_offset, ret,
                                SYNC_FILE_RANGE_WRITE);
This page took 0.035103 seconds and 4 git commands to generate.