Re: [PATCH v2] kcmp: Comment get_file_raw_ptr() RCU usage

From: Cyrill Gorcunov
Date: Thu Feb 03 2022 - 08:58:25 EST


On Thu, Feb 03, 2022 at 08:31:34AM -0500, Jason Andryuk wrote:
> This usage of RCU appears wrong since the pointer is passed outside the
> RCU region. However, it is only used as a number and not dereferenced,
> so it is okay. Leave a comment for the next reader.
>
> Without a reference, these comparisons are racy, but even with their use
> inside an RCU region, the result could go stale.
>
> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>

Looks ok to me, thanks a lot! I should put somthing similar a way
earlier when this code been developed. I must confess I'm not a big
fan of merging comments-only commits (since they affect git history),
but since it brings more understanding into what the code is doing

Acked-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>