summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthomas <thomas@FreeBSD.org>2007-02-27 09:00:51 +0000
committerthomas <thomas@FreeBSD.org>2007-02-27 09:00:51 +0000
commitdf5a88905d480ab8dd10195a8cb6ed9b6627b233 (patch)
treec00d6e27798583673e2423efa3dd57de736cfd50
parentcd574ae8e236a9a3759587c238e023b9f364218f (diff)
downloadFreeBSD-src-df5a88905d480ab8dd10195a8cb6ed9b6627b233.zip
FreeBSD-src-df5a88905d480ab8dd10195a8cb6ed9b6627b233.tar.gz
(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 <josh.carroll@gmail.com> for providing the traces that allowed identifying this problem. PR: kern/103602 MFC after: 1 week
-rw-r--r--sys/dev/ata/atapi-cam.c4
1 files 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 <thomas@cuivre.fr.eu.org>
+ * Copyright (c) 2001-2007 Thomas Quinot <thomas@cuivre.fr.eu.org>
* 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;
OpenPOWER on IntegriCloud