Author: hselasky Date: Tue May 24 07:52:53 2016 New Revision: 300591 URL: https://svnweb.freebsd.org/changeset/base/300591
Log: Use the DROP_GIANT() and PICKUP_GIANT() macros instead of making assumptions about how the Giant mutex is locked. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Tue May 24 07:46:20 2016 (r300590) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Tue May 24 07:52:53 2016 (r300591) @@ -146,12 +146,12 @@ linux_pci_attach(device_t dev) else pdev->dev.irq = 255; pdev->irq = pdev->dev.irq; - mtx_unlock(&Giant); + DROP_GIANT(); spin_lock(&pci_lock); list_add(&pdev->links, &pci_devices); spin_unlock(&pci_lock); error = pdrv->probe(pdev, id); - mtx_lock(&Giant); + PICKUP_GIANT(); if (error) { spin_lock(&pci_lock); list_del(&pdev->links); @@ -173,9 +173,9 @@ linux_pci_detach(device_t dev) td = curthread; linux_set_current(td, &t); pdev = device_get_softc(dev); - mtx_unlock(&Giant); + DROP_GIANT(); pdev->pdrv->remove(pdev); - mtx_lock(&Giant); + PICKUP_GIANT(); spin_lock(&pci_lock); list_del(&pdev->links); spin_unlock(&pci_lock); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"