All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	"Eric W . Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH v2] kcmp: Comment get_file_raw_ptr() RCU usage
Date: Thu, 3 Feb 2022 16:58:19 +0300	[thread overview]
Message-ID: <Yfvfe+TmR1WIuj/U@grain> (raw)
In-Reply-To: <20220203133134.6949-1-jandryuk@gmail.com>

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>

      reply	other threads:[~2022-02-03 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 13:31 [PATCH v2] kcmp: Comment get_file_raw_ptr() RCU usage Jason Andryuk
2022-02-03 13:58 ` Cyrill Gorcunov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yfvfe+TmR1WIuj/U@grain \
    --to=gorcunov@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=jandryuk@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.