From: Jason Gunthorpe <jgg@mellanox.com>
To: Gal Pressman <galpress@amazon.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Michal Kalderon <michal.kalderon@marvell.com>
Subject: Re: [PATCH] RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence
Date: Thu, 16 Jan 2020 13:05:30 +0000 [thread overview]
Message-ID: <20200116130527.GD20978@mellanox.com> (raw)
In-Reply-To: <558b9eac-ce28-a0b7-9830-5416d0a0f7ca@amazon.com>
On Thu, Jan 16, 2020 at 10:51:52AM +0200, Gal Pressman wrote:
> On 15/01/2020 22:20, Jason Gunthorpe wrote:
> > The set of entry->driver_removed is missing locking, protect it with
> > xa_lock() which is held by the only reader.
> >
> > Otherwise readers may continue to see driver_removed = false after
> > rdma_user_mmap_entry_remove() returns and may continue to try and
> > establish new mmaps.
>
> That's kind of an inherent race regardless, isn't it?
How do you mean? Once rdma_user_mmap_entry_remove() returns no new
mmaps can be established, existing mmaps remain. The driver can rely
on this, by, for instance, calling free_page
Jason
next prev parent reply other threads:[~2020-01-16 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 20:20 [PATCH] RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence Jason Gunthorpe
2020-01-16 8:51 ` Gal Pressman
2020-01-16 13:05 ` Jason Gunthorpe [this message]
2020-01-20 11:07 ` Michal Kalderon
2020-01-25 18:52 ` Jason
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=20200116130527.GD20978@mellanox.com \
--to=jgg@mellanox.com \
--cc=galpress@amazon.com \
--cc=linux-rdma@vger.kernel.org \
--cc=michal.kalderon@marvell.com \
/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.