diff options
author | simokawa <simokawa@FreeBSD.org> | 2003-12-13 15:33:45 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2003-12-13 15:33:45 +0000 |
commit | 6e2380a7c32d65f61a7868e9e15806051c84eddb (patch) | |
tree | 02a71453dc05b078a02caa76371fbd7e18a0f73d /sys/dev/firewire/sbp_targ.c | |
parent | 87bbd0b0315f40affb8b62f1651a4473c81757e4 (diff) | |
download | FreeBSD-src-6e2380a7c32d65f61a7868e9e15806051c84eddb.zip FreeBSD-src-6e2380a7c32d65f61a7868e9e15806051c84eddb.tar.gz |
Fix panic.
- Don't call sbp_targ_status_FIFO() twice for LOGIN error.
- Don't access login if it's NULL.
Diffstat (limited to 'sys/dev/firewire/sbp_targ.c')
-rw-r--r-- | sys/dev/firewire/sbp_targ.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 842e908..32f11cf 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -235,7 +235,6 @@ sbp_targ_probe(device_t dev) return (0); } - static void sbp_targ_dealloc_login(struct sbp_targ_login *login) { @@ -1295,8 +1294,6 @@ sbp_targ_mgm_handler(struct fw_xfer *xfer) orbi->status.dead = 1; orbi->status.status = STATUS_ACCESS_DENY; orbi->status.len = 1; - sbp_targ_status_FIFO(orbi, orb[6], orb[7], - /*dequeue*/0); break; } @@ -1308,8 +1305,6 @@ sbp_targ_mgm_handler(struct fw_xfer *xfer) orbi->status.dead = 1; orbi->status.status = STATUS_RES_UNAVAIL; orbi->status.len = 1; - sbp_targ_status_FIFO(orbi, orb[6], orb[7], - /*dequeue*/0); break; } @@ -1325,6 +1320,7 @@ sbp_targ_mgm_handler(struct fw_xfer *xfer) sizeof(struct sbp_login_res), (void *)&login->loginres, fw_asy_callback_free); STAILQ_INSERT_TAIL(&lstate->logins, login, link); + /* XXX return status after loginres is successfully written */ break; } case ORB_FUN_RCN: @@ -1338,7 +1334,7 @@ sbp_targ_mgm_handler(struct fw_xfer *xfer) orbi->status.dead = 1; orbi->status.status = STATUS_ACCESS_DENY; printf("%s: reconnection faild id=%d\n", - __FUNCTION__, login->id); + __FUNCTION__, orb4->id); } break; case ORB_FUN_LGO: |