From df5a88905d480ab8dd10195a8cb6ed9b6627b233 Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 27 Feb 2007 09:00:51 +0000 Subject: (cam_rescan): Do not reference ccb->ccb_h.path in CAM_DEBUG call before it is initialized; use path instead. This change fixes a panic when using atapicam in conjunction with CAMDEBUG, which has been described under kern/103602. Thanks to Josh Carroll for providing the traces that allowed identifying this problem. PR: kern/103602 MFC after: 1 week --- sys/dev/ata/atapi-cam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 28a95d0..3eebf72 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2001-2003 Thomas Quinot + * Copyright (c) 2001-2007 Thomas Quinot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -807,7 +807,7 @@ cam_rescan(struct cam_sim *sim) return; } - CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("Rescanning ATAPI bus.\n")); + CAM_DEBUG(path, CAM_DEBUG_TRACE, ("Rescanning ATAPI bus.\n")); xpt_setup_ccb(&ccb->ccb_h, path, 5/*priority (low)*/); ccb->ccb_h.func_code = XPT_SCAN_BUS; ccb->ccb_h.cbfcnp = cam_rescan_callback; -- cgit v1.1