mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firewire: ohci: release channel in error path
@ 2010-07-28 13:50 Stefan Richter
  0 siblings, 0 replies; only message in thread
From: Stefan Richter @ 2010-07-28 13:50 UTC (permalink / raw)
  To: linux1394-devel; +Cc: linux-kernel

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.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/firewire/ohci.c |    1 +
 1 file changed, 1 insertion(+)

Index: b/drivers/firewire/ohci.c
===================================================================
--- a/drivers/firewire/ohci.c
+++ 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);
 

-- 
Stefan Richter
-=====-==-=- -=== ===--
http://arcgraph.de/sr/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-28 13:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-28 13:50 [PATCH] firewire: ohci: release channel in error path Stefan Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®