Skip to content

Commit

Permalink
iolog: fix Null pointer dereferences (FORWARD_NULL)
Browse files Browse the repository at this point in the history
CID 494150: Null pointer dereferences (FORWARD_NULL) @ iolog.c:148 in ipo_special()
This patch removes the possibility of null pointer dereferencing(io_u->file)
throughout the call stack of get_io_u() → read_iolog_get() → dp_fill_dspec_data()

Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
  • Loading branch information
parkvibes committed May 31, 2024
1 parent d5fbe84 commit a70e681
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iolog.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,15 @@ int read_iolog_get(struct thread_data *td, struct io_u *io_u)
io_u->buflen, io_u->file->file_name);
if (ipo->delay)
iolog_delay(td, ipo->delay);

if (td->o.dp_type != FIO_DP_NONE)
dp_fill_dspec_data(td, io_u);
} else {
elapsed = mtime_since_genesis();
if (ipo->delay > elapsed)
usec_sleep(td, (ipo->delay - elapsed) * 1000);
}

if (td->o.dp_type != FIO_DP_NONE)
dp_fill_dspec_data(td, io_u);

free(ipo);

if (io_u->ddir != DDIR_WAIT)
Expand Down

0 comments on commit a70e681

Please sign in to comment.