Messages in this thread | | | Date | Thu, 14 Apr 2022 23:47:14 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH v2] uio/uio_pci_generic: Introduce refcnt on open/release |
| |
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.
| |