firewire: potentially invalid pointers used in fw_card_bm_work
commit15803478fdea964e5f76079851fcd13068208d5d
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 24 Feb 2008 17:57:23 +0000 (24 18:57 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sun, 2 Mar 2008 11:35:46 +0000 (2 12:35 +0100)
tree153bc372845c2223ec798ff4c0f3896221fe4e97
parentf8436158b1d76e6842856048f287799468b56eb2
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>
drivers/firewire/fw-card.c
drivers/firewire/fw-topology.c