Re: [PATCH] PCI: access.c: Piggyback user config access on pci_read/write_*()

2018-06-04 Thread Alex_Gagniuc
On 6/4/2018 11:09 AM, Keith Busch wrote: > On Mon, Jun 04, 2018 at 10:48:02AM -0500, Alexandru Gagniuc wrote: >> +++ b/drivers/pci/access.c >> @@ -223,16 +223,9 @@ int pci_user_read_config_##size >> \ >> (struct pci_dev *dev, int pos, type *val)

Re: [PATCH] PCI: access.c: Piggyback user config access on pci_read/write_*()

2018-06-04 Thread Keith Busch
On Mon, Jun 04, 2018 at 10:48:02AM -0500, Alexandru Gagniuc wrote: > +++ b/drivers/pci/access.c > @@ -223,16 +223,9 @@ int pci_user_read_config_##size > \ > (struct pci_dev *dev, int pos, type *val) \ > {

[PATCH] PCI: access.c: Piggyback user config access on pci_read/write_*()

2018-06-04 Thread Alexandru Gagniuc
pci_read/write_config*() functions have several safeguards to prevent stallling accesses when a device is removed. However, their "_user_" counterparts use a different code path. To make sure that safeguards are used for userspace PCI config accesses, piggyback the "_user_" functions on the in-ker