Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651673

Re: [PATCH] pci: iov: use device lock to protect IOV sysfs accesses

From Jakub Kicinski <jakub.kicinski@netronome.com>
Newsgroups linux.kernel
Subject Re: [PATCH] pci: iov: use device lock to protect IOV sysfs accesses
Date 2017-05-27 03:30 +0200
Message-ID <tLyIm-4Vw-143@gated-at.bofh.it> (permalink)
References <tK4sW-3eD-15@gated-at.bofh.it> <tLyIm-4Vw-145@gated-at.bofh.it>
Organization Netronome Systems, Ltd.

Show all headers | View raw


On Fri, 26 May 2017 18:47:26 -0500, Bjorn Helgaas wrote:
> On Mon, May 22, 2017 at 03:50:23PM -0700, Jakub Kicinski wrote:
> > PCI core sets the driver pointer before calling ->probe() and only
> > clears it after ->remove().  This means driver's ->sriov_configure()
> > callback will happily race with probe() and remove(), most likely
> > leading to BUGs, since drivers don't expect this.  
> 
> I guess you're referring to the pci_dev->driver pointer set by
> local_pci_probe(), and this is important because sriov_numvfs_store()
> checks that pointer, right?

Yes, exactly.  I initially thought this is how the safety of sriov
callback may have been ensured, but since the order of
local_pci_probe() and the assignment is what it is, it can't.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] pci: iov: use device lock to protect IOV sysfs accesses Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-05-27 03:30 +0200
  Re: [PATCH] pci: iov: use device lock to protect IOV sysfs accesses Bjorn Helgaas <helgaas@kernel.org> - 2017-05-31 01:10 +0200
    Re: [PATCH] pci: iov: use device lock to protect IOV sysfs accesses Jakub Kicinski <kubakici@wp.pl> - 2017-05-31 01:40 +0200

csiph-web