[PATCH 1/2] firewire: catch self_id_count == 0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Wednesday, March 19, 2008 - 12:55 pm

fw_core_handle_bus_reset() incorrectly relied on the assumption that
self_id_count > 0.  The added check should fix one aspect of
http://bugzilla.kernel.org/show_bug.cgi?id=10128

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

Index: linux/drivers/firewire/fw-topology.c
===================================================================
--- linux.orig/drivers/firewire/fw-topology.c
+++ linux/drivers/firewire/fw-topology.c
@@ -513,6 +513,11 @@ fw_core_handle_bus_reset(struct fw_card 
 
 	fw_flush_transactions(card);
 
+	if (self_id_count == 0) {
+		fw_destroy_nodes(card);
+		return;
+	}
+
 	spin_lock_irqsave(&card->lock, flags);
 
 	/*

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] firewire: catch self_id_count == 0, Stefan Richter, (Wed Mar 19, 12:55 pm)
Re: [PATCH 1/2] firewire: catch self_id_count == 0, Stefan Richter, (Wed Mar 19, 1:11 pm)
Re: [PATCH 1/2] firewire: catch self_id_count == 0, Stefan Richter, (Wed Mar 19, 1:24 pm)
[PATCH] firewire: fw-ohci: add self ID error check, Stefan Richter, (Wed Mar 19, 1:32 pm)
Re: [PATCH] firewire: fw-ohci: add self ID error check, Stefan Richter, (Wed Mar 19, 1:37 pm)
[PATCH update] firewire: fw-ohci: add self ID error check, Stefan Richter, (Wed Mar 19, 1:40 pm)
[PATCH] firewire: fw-ohci: catch self_id_count == 0, Stefan Richter, (Wed Mar 19, 2:05 pm)
Re: [PATCH] firewire: fw-ohci: catch self_id_count == 0, Stefan Richter, (Sat Mar 22, 3:20 am)
Re: [PATCH] firewire: fw-ohci: catch self_id_count == 0, Jarod Wilson, (Sat Mar 22, 8:39 pm)