On Thu, Feb 06, 2020 at 03:28:12PM +0100, Jan Kara wrote:
@@ -1844,18 +1896,18 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev, } ret = 0;
- if (q->blk_trace == NULL)
- if (bt == NULL) ret = blk_trace_setup_queue(q, bdev);
if (ret == 0) { if (attr == &dev_attr_act_mask)
q->blk_trace->act_mask = value;
bt->act_mask = value;
You've likely seen this already, but Coverity complains that "bt" may be a NULL pointer here, since we checked it for NULL above.
CID 1460458: Null pointer dereferences (FORWARD_NULL)
else if (attr == &dev_attr_pid)
q->blk_trace->pid = value;
else if (attr == &dev_attr_start_lba)bt->pid = value;
q->blk_trace->start_lba = value;
else if (attr == &dev_attr_end_lba)bt->start_lba = value;
q->blk_trace->end_lba = value;
}bt->end_lba = value;
out_unlock_bdev: