aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-topology.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-24 12:57:23 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-03-02 06:35:46 -0500
commit15803478fdea964e5f76079851fcd13068208d5d (patch)
tree153bc372845c2223ec798ff4c0f3896221fe4e97 /drivers/firewire/fw-topology.c
parentf8436158b1d76e6842856048f287799468b56eb2 (diff)
firewire: potentially invalid pointers used in fw_card_bm_work
The bus management workqueue job was in danger to dereference NULL pointers. Also, after having temporarily lifted card->lock, a few node pointers and a device pointer may have become invalid. Add NULL pointer checks and get the necessary references. Also, move card->local_node out of fw_card_bm_work's sight during shutdown of the card. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r--drivers/firewire/fw-topology.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index 172c1867e9a..e47bb040197 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -383,6 +383,7 @@ void fw_destroy_nodes(struct fw_card *card)
383 card->color++; 383 card->color++;
384 if (card->local_node != NULL) 384 if (card->local_node != NULL)
385 for_each_fw_node(card, card->local_node, report_lost_node); 385 for_each_fw_node(card, card->local_node, report_lost_node);
386 card->local_node = NULL;
386 spin_unlock_irqrestore(&card->lock, flags); 387 spin_unlock_irqrestore(&card->lock, flags);
387} 388}
388 389