firewire: Survive more than 256 bus resets
authorJay Fenlason <fenlason@redhat.com>
Mon, 27 Oct 2008 22:27:37 +0000 (23:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Nov 2008 03:05:44 +0000 (19:05 -0800)
Same as commit 4f9740d4f5a17fa6a1b097fa3ccdfb7246660307 upstream

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.

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

Signed-off-by: Jay Fenlason <fenlason@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/firewire/fw-transaction.h

index 2ae1b0d6cb7bdfaa6929ccc06a00d63501acebcf..81b15ba91d3198bc1ef0241f2d02a45494e5b73a 100644 (file)
@@ -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;