aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Quinot <thomas@FreeBSD.org>2007-02-27 09:00:51 +0000
committerThomas Quinot <thomas@FreeBSD.org>2007-02-27 09:00:51 +0000
commit4647ebfc010c0cbbaee4c2f452ee249ed86ced7a (patch)
treec00d6e27798583673e2423efa3dd57de736cfd50
parent65835cf3413cf7d7d5d167b16a1b77ed2f800c15 (diff)
downloadsrc-4647ebfc010c0cbbaee4c2f452ee249ed86ced7a.tar.gz
src-4647ebfc010c0cbbaee4c2f452ee249ed86ced7a.zip
(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
Notes
Notes: svn path=/head/; revision=167061
-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 28a95d073701..3eebf729d1b6 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;