On 03/12/2020 00:55, Ming Lei wrote:
Hi Ming,
Yeah, so I said that was another problem which you mentioned there, whichThe thing is that this patch does not fix the issue completely.
I'm not addressing, but I don't think that I'm making thing worse here.
So AFAICS, the blk-mq/sched code doesn't wait for any "readers" to beIt looks good, however devil is in details, please make into patch for
finished, such as those running blk_mq_queue_tag_busy_iter or
blk_mq_tagset_busy_iter() in another context.
So how about the idea of introducing some synchronization primitive, such as
semaphore, which those "readers" must grab and release at start and end (of
iter), to ensure the requests are not freed during the iteration?
review.
OK, but another thing to say is that I need to find a somewhat reliable reproducer for the potential problem you mention. So far this patch solves the issue I see (in that kasan stops warning). Let me analyze this a bit further.