فهرست منبع

cnss2: Protect PCI bus resume with mutex lock

Race condition seen between WAKE interrupt handler
and HOST triggered recovery. Due to the race PCI
link up is called back to back. Protect PCI bus
resume with bus_lock mutex.

Change-Id: Ifc140921bdf803bc2d46365b4e5a59cba34ee715
CRs-Fixed: 3614970
Naman Padhiar 1 سال پیش
والد
کامیت
a883a8f321
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      cnss2/pci.c

+ 2 - 0
cnss2/pci.c

@@ -3989,7 +3989,9 @@ static int cnss_pci_resume(struct device *dev)
 		goto out;
 
 	if (!pci_priv->disable_pc) {
+		mutex_lock(&pci_priv->bus_lock);
 		ret = cnss_pci_resume_bus(pci_priv);
+		mutex_unlock(&pci_priv->bus_lock);
 		if (ret)
 			goto out;
 	}