latency logging with file operation IO engines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shin'ichiro,

Coverity reported the issue below with the "stat: reduce arguments of add_log_sample()" commit.

** CID 509196:  Null pointer dereferences  (FORWARD_NULL)

________________________________________________________________________________________________________
*** CID 509196:  Null pointer dereferences  (FORWARD_NULL)
/stat.c: 3342 in add_clat_sample()
3336     	 */
3337     	if (!ts->lat_percentiles)
3338     		add_stat_prio_sample(ts->clat_prio[ddir], clat_prio_index,
3339     				     nsec);
3340
3341     	if (td->clat_log) {
>>>     CID 509196:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "&io_u->issue_time" to "ntime_since", which dereferences it.
3342     		struct log_sample sample = { sample_val(nsec), ddir, bs,
3343     			offset, ioprio,
3344     			ntime_since(&td->epoch, &io_u->issue_time) };
3345
3346     		add_log_sample(td, td->clat_log, &sample);
3347     	}

It appears that with the refactoring it is no longer possible to carry out latency logging with the file operation ioengines since their calls set io_u to NULL. Would you be able to devise a way to restore this?

Vincent




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux