Re: [PATCH] blktrace: fix dereference after null check

From: Cengiz Can
Date: Wed Mar 04 2020 - 06:07:21 EST


On 2020-03-03 17:14, Steven Rostedt wrote:

Note, you should probably add a note in your change log that this issue was
found by Coverity. Sometimes static analyzers have a tag of some kind that
they would like patches that fix the issues they discover to be in the
change log. This way they can track the fixes that are found by the tool.


I have added the Coverity issue ID and relevant notes to mark it. Thanks.


As I said in the other email, the above assignment still needs RCU
annotation:

bt = rcu_dereference_protected(q->blk_trace,
lockdep_is_held(&q->blk_trace_mutex));

I missed that. Thanks for reminding. TIL.

Please check PATCH-v2.

--
Cengiz Can
@cengiz_io