NVMe induced NULL deref in bt_iter()

Sagi Grimberg sagi at grimberg.me
Tue Jul 4 02:14:12 PDT 2017



On 04/07/17 11:08, Ming Lei wrote:
> On Tue, Jul 04, 2017 at 10:56:23AM +0300, Sagi Grimberg wrote:
>>
>>> There are at least one case in which we have to use stop queues:
>>>
>>> 	- when QUEUE_BUSY(now it becomes BLK_STS_RESOURCE) happens, some drivers
>>> 	need to stop queues for avoiding to hurt CPU, such as virtio-blk, ...
>>
>> Why isn't virtio_blk using blk_mq_delay_run_hw_queue like scsi does?
> 
> IMO it shouldn't be easy to figure out one perfect delay time,

It doesn't needs to be perfect, just something that is sufficient
to not hog the cpu and won't have noticeable effects...

> and it should have been self-adaptive.

But IMO always start the queues on *every* completion is a waste... why
iterating on all the hw queues on each completion?

> Also I think it might be possible to move this kind of stop action into
> blk-mq core code, and not let drivers touch stop state. Finally we
> may kill all stopping in drivers.

That's a good idea!



More information about the Linux-nvme mailing list