lkml.org 
[lkml]   [2022]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] kcmp: Comment get_file_raw_ptr() RCU usage
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@gmail.com>

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@gmail.com>

\
 
 \ /
  Last update: 2022-02-03 14:59    [W:0.222 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site