[patch 2.6.27.y 3/6] firewire: Survive more than 256 bus resets

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Monday, October 27, 2008 - 3:27 pm

Date: Thu, 16 Oct 2008 15:51:59 -0400
From: Jay Fenlason <fenlason@redhat.com>

The "color" is used during the topology building after a bus reset,
hovever in "struct fw_node"s it is stored in a u8, but in struct fw_card
it is stored in an int.  When the value wraps in one struct, but not
the other, disaster strikes.

Signed-off-by: Jay Fenlason <fenlason@redhat.com>

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=10922 -
machine locks up solid if a series of bus resets occurs.

Same as commit 4f9740d4f5a17fa6a1b097fa3ccdfb7246660307.

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

Index: linux/drivers/firewire/fw-transaction.h
===================================================================
--- linux.orig/drivers/firewire/fw-transaction.h
+++ linux/drivers/firewire/fw-transaction.h
@@ -248,7 +248,7 @@ struct fw_card {
 	struct fw_node *local_node;
 	struct fw_node *root_node;
 	struct fw_node *irm_node;
-	int color;
+	u8 color; /* must be u8 to match the definition in struct fw_node */
 	int gap_count;
 	bool beta_repeaters_present;
 

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

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

Messages in current thread:
[patch 2.6.27.y 2/6] firewire: fix ioctl() return code, Stefan Richter, (Mon Oct 27, 3:26 pm)
[patch 2.6.27.y 3/6] firewire: Survive more than 256 bus r ..., Stefan Richter, (Mon Oct 27, 3:27 pm)
[patch 2.6.27.y 6/6] firewire: fw-sbp2: fix races, Stefan Richter, (Mon Oct 27, 3:29 pm)