Re: [PATCH 0/8]: blk-mq: use static_rqs to iterate busy tags

From: Bart Van Assche
Date: Mon Mar 18 2019 - 13:28:11 EST


On Fri, 2019-03-15 at 16:57 +-0800, Jianchao Wang wrote:
+AD4 +AFs-2+AF0 https://marc.info/?l+AD0-linux-block+ACY-m+AD0-154526189023236+ACY-w+AD0-2

Hi Jianchao,

That is a reference to the +ACI-BUG: KASAN: use-after-free in bt+AF8-iter+ACI issue.
I think that issue can be fixed in another way than modifying all code that
iterates over tags, namely by adding an rcu+AF8-read+AF8-lock() / rcu+AF8-read+AF8-unlock()
pair in bt+AF8-for+AF8-each() and bt+AF8-tags+AF8-for+AF8-each() and by changing the calls in
blk+AF8-mq+AF8-free+AF8-rqs() and blk+AF8-free+AF8-flush+AF8-queue() that free the data structures
used by the tag iteration functions into kfree+AF8-rcu() or call+AF8-rcu() calls.

Thanks,

Bart.