From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Avi Weiss <thnkslprpt@gmail.com>
Cc: Yaxing Guo <guoyaxing@bosc.ac.cn>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uio: uio_pci_generic_sva: reject multiple opens
Date: Wed, 28 Oct 2026 09:04:31 +0100 [thread overview]
Message-ID: <2026102846-zoom-upwind-cce7@gregkh> (raw)
In-Reply-To: <20261028072725.623111-2-thnkslprpt@gmail.com>
On Wed, Oct 28, 2026 at 09:27:26AM +0200, Avi Weiss wrote:
> uio_pci_sva_open() stores an SVA binding handle in device-wide state.
> A second open from another address space overwrites that handle. Closing
> the two descriptors then unbinds the second handle twice and leaves the
> first binding active.
>
> Reject another open while a binding is active and clear the handle on
> release. UIO core already serializes the callbacks under info_lock.
That's up to userspace to protect, as it can pass around file
descriptors to other processes just fine, and the kernel can't do
anything about that, so this type of change doesn't make much sense.
In other words, if you open the device multiple times, that's your
problem, you get to keep both pieces :)
thanks,
greg k-h
prev parent reply other threads:[~2026-10-28 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 7:27 Avi Weiss
2026-10-28 8:04 ` Greg Kroah-Hartman [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=2026102846-zoom-upwind-cce7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=guoyaxing@bosc.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=thnkslprpt@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®