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

From: Stefan Richter
Date: Wed Mar 19 2008 - 17:06:29 EST


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@xxxxxxxxxxxxxxxxx>
---
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/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/