Skip to contentSkip to conversation

xen: double lock typo

PATCH In review Dan Carpenter 2 participants 2 messages Sep 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: double lock typo

We called mutex_lock() twice instead of unlocking.

drivers/xen/xen-pciback/vpci.c +1 -1
index 01222d7..46d140b 100644
@@ -238,7 +238,7 @@ static int __xen_pcibk_get_pcifront_dev(struct pci_dev *pcidev,
 			}
 		}
 	}
-	mutex_lock(&vpci_dev->lock);
+	mutex_unlock(&vpci_dev->lock);
 	return found;
 }
 
#1 lore raw
Quoted 1 line · Dan Carpenter

We called mutex_lock() twice instead of unlocking.

Duh. OK, queued up.

Quoted 16 lines
drivers/xen/xen-pciback/vpci.c +1 -1
index 01222d7..46d140b 100644
@@ -238,7 +238,7 @@ static int __xen_pcibk_get_pcifront_dev(struct pci_dev *pcidev,
 			}
 		}
 	}
-	mutex_lock(&vpci_dev->lock);
+	mutex_unlock(&vpci_dev->lock);
 	return found;
 }