From 9e2cdfd1d1e0ee20b53f837aa1e7cb39986ebd47 Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Fri, 25 Nov 2005 14:29:24 +0000 Subject: [PATCH] Fix panic when we cannot find self-id of probing nodes. This shouldn't happen as far as the self-id buffer is vaild but some people have this problem. PR: kern/83999 Submitted by: Markus Wild MFC after: 3 days --- sys/dev/firewire/firewire.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 9636b12ad6e3..8dba5c2a8cfb 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -1324,6 +1324,7 @@ fw_bus_explore(struct firewire_comm *fc ) uint32_t addr; struct fw_xfer *xfer; struct fw_pkt *fp; + union fw_self_id *fwsid; if(fc->status != FWBUSEXPLORE) return; @@ -1336,7 +1337,8 @@ fw_bus_explore(struct firewire_comm *fc ) /* check link */ /* XXX we need to check phy_id first */ - if (!fw_find_self_id(fc, fc->ongonode)->p0.link_active) { + fwsid = fw_find_self_id(fc, fc->ongonode); + if (!fwsid || !fwsid->p0.link_active) { if (firewire_debug) printf("node%d: link down\n", fc->ongonode); fc->ongonode++;