]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Remove extra device_lock assert checks
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 19 Oct 2021 07:49:54 +0000 (10:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 12:16:14 +0000 (13:16 +0100)
commit9a932e55f7647d5af1396aea35c0da9a44e414b5
tree72f9000e295fb251aa729503a58ac8491f24baf3
parent032ca8549a7838bfaa0e6255d2938da6d52ad1f3
devlink: Remove extra device_lock assert checks

PCI core code in the pci_call_probe() has a path that doesn't hold
device_lock. It happens because the ->probe() is called through the
workqueue mechanism.

   349 static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
   350                           const struct pci_device_id *id)
   351 {
   352
....
   377         if (cpu < nr_cpu_ids)
   378                 error = work_on_cpu(cpu, local_pci_probe, &ddi);

Luckily enough, the core still ensures that only single flow is executed,
so it safe to remove the assert checks that anyway were added for annotations
purposes.

Fixes: fde1dc19ecfb ("devlink: Annotate devlink API calls")
Reported-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c