diff options
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 74ffa0847..4ad991fc4 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -1276,7 +1276,11 @@ static long syz_read_part_table(volatile unsigned long size, volatile unsigned l } for (i = 0; i < nsegs; i++) { struct fs_image_segment* segs = (struct fs_image_segment*)segments; - NONFAILING(pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset)); + int res1 = 0; + NONFAILING(res1 = pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset)); + if (res1 < 0) { + debug("syz_read_part_table: pwrite[%u] failed: %d\n", (int)i, errno); + } } snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); loopfd = open(loopname, O_RDWR); @@ -1361,7 +1365,11 @@ static long syz_mount_image(volatile long fsarg, volatile long dir, volatile uns } for (i = 0; i < nsegs; i++) { struct fs_image_segment* segs = (struct fs_image_segment*)segments; - NONFAILING(pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset)); + int res1 = 0; + NONFAILING(res1 = pwrite(memfd, segs[i].data, segs[i].size, segs[i].offset)); + if (res1 < 0) { + debug("syz_mount_image: pwrite[%u] failed: %d\n", (int)i, errno); + } } snprintf(loopname, sizeof(loopname), "/dev/loop%llu", procid); loopfd = open(loopname, O_RDWR); |
