public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Yao Hongbo <yaohongbo@linux.alibaba.com>,
	mst@redhat.com, alikernel-developer@linux.alibaba.com,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] uio/uio_pci_generic: Introduce refcnt on open/release
Date: Thu, 14 Apr 2022 23:47:14 -0700	[thread overview]
Message-ID: <YlkU8pLLlbo4WgQC@infradead.org> (raw)
In-Reply-To: <YlZ8vZ9RX5i7mWNk@kroah.com>

On Wed, Apr 13, 2022 at 09:33:17AM +0200, Greg KH wrote:
> On Wed, Apr 13, 2022 at 03:01:42PM +0800, Yao Hongbo wrote:
> > If two userspace programs both open the PCI UIO fd, when one
> > of the program exits uncleanly, the other will cause IO hang
> > due to bus-mastering disabled.
> > 
> > It's a common usage for spdk/dpdk to use UIO. So, introduce refcnt
> > to avoid such problems.
> 
> Why do you have multiple userspace programs opening the same device?
> Shouldn't they coordinate?

Independent of that (very valid) question I think the current code is
just broken.  Either we need to prohbit multiple opens or do this kind
of refcounting.

      parent reply	other threads:[~2022-04-15  6:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  7:01 [PATCH v2] uio/uio_pci_generic: Introduce refcnt on open/release Yao Hongbo
2022-04-13  7:33 ` Greg KH
2022-04-13  8:51   ` Michael S. Tsirkin
2022-04-13  9:25     ` Yao Hongbo
2022-04-13  9:43       ` Greg KH
2022-04-13 11:09         ` Yao Hongbo
2022-04-13 11:20           ` Greg KH
2022-04-15  6:47   ` Christoph Hellwig [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=YlkU8pLLlbo4WgQC@infradead.org \
    --to=hch@infradead.org \
    --cc=alikernel-developer@linux.alibaba.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=yaohongbo@linux.alibaba.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