Skip to contentSkip to conversation

firewire: ohci: release channel in error path

PATCH New Stefan Richter 1 participant 1 message Jul 28, 2010 Firewire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firewire: ohci: release channel in error path

firewire-ohci keeps book of which isochronous channels are occupied by IR DMA contexts, so that there cannot be more than one context listening to a certain channel.

If IR context creation failed due to an out-of-memory condition, this bookkeeping leaked a channel.

---
 drivers/firewire/ohci.c |    1 +
 1 file changed, 1 insertion(+)
drivers/firewire/ohci.c +1 -0
Index: b/drivers/firewire/ohci.c
===================================================================
@@ -2314,6 +2314,7 @@ static struct fw_iso_context *ohci_alloc
 	free_page((unsigned long)ctx->header);
  out:
 	spin_lock_irqsave(&ohci->lock, flags);
+	*channels |= 1ULL << channel;
 	*mask |= 1 << index;
 	spin_unlock_irqrestore(&ohci->lock, flags);
 
Signature · 3 lines
Stefan Richter
-=====-==-=- -=== ===--
http://arcgraph.de/sr/