[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yfvfe+TmR1WIuj/U@grain>
Date: Thu, 3 Feb 2022 16:58:19 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Jason Andryuk <jandryuk@...il.com>
Cc: linux-kernel@...r.kernel.org,
"Eric W . Biederman" <ebiederm@...ssion.com>
Subject: Re: [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@...il.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@...il.com>
Powered by blists - more mailing lists