kconsumerd: fix infinite loop in splice handling of subbuf larger than 4k
[lttng-tools.git] / 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.031133 seconds and 4 git commands to generate.