From: Jason Gunthorpe <jgg@nvidia.com>
To: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Cc: Dean Luick <dean.luick@cornelisnetworks.com>, linux-rdma@vger.kernel.org
Subject: Re: FIXME in hfi1/user_exp_rcv.c
Date: Fri, 14 Oct 2022 10:08:39 -0300 [thread overview]
Message-ID: <Y0lfV7rX9NOOo1Bj@nvidia.com> (raw)
In-Reply-To: <b2274301-bf82-f3cf-20ff-0fc19b2014fd@cornelisnetworks.com>
On Thu, Oct 13, 2022 at 09:48:29AM -0400, Dennis Dalessandro wrote:
> On 10/13/22 9:21 AM, Jason Gunthorpe wrote:
> > On Thu, Oct 13, 2022 at 07:59:52AM -0500, Dean Luick wrote:
> >> Hi Jason,
> >>
> >> I am looking at the FIXME you left in hfi1/user_exp_rcv.c with git commit 3889551db212
> >>
> >> Link: https://lore.kernel.org/r/20191112202231.3856-7-jgg@ziepe.ca
> >>
> >> Can you please explain in more detail what made you add the FIXME and what may be "racy"?
> >
> > The comment seems self explanatory, the ordering is upposed to have
> > mmu_interval_read_begin() done before the page tables are read, not
> > after - since we already have a page list at this point it can't be
> > right.
>
> Is the race you are worried about here when a user proc tries to free the memory
> before we get done handling the IOCTL to set up the recvs?
The mechanism of mmu notifiers allows coherently reading the page
table with a notification when the read becomes invalid. If you don't
order things properly then it just doesn't work as advertised.
Jason
prev parent reply other threads:[~2022-10-14 13:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 12:59 FIXME in hfi1/user_exp_rcv.c Dean Luick
2022-10-13 13:21 ` Jason Gunthorpe
2022-10-13 13:48 ` Dennis Dalessandro
2022-10-14 13:08 ` Jason Gunthorpe [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=Y0lfV7rX9NOOo1Bj@nvidia.com \
--to=jgg@nvidia.com \
--cc=dean.luick@cornelisnetworks.com \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=linux-rdma@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox