aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2021-05-16 19:11:46 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2021-05-16 19:19:19 +0000
commit75b5caa08ef286b484aee6ddae61582b8b7ac407 (patch)
tree6f8165e2fda3346b8d6bbaf3473f6a8e3f806948
parentfb580451456aa769daa2f4b2f077e39692f80c62 (diff)
downloadsrc-75b5caa08ef286b484aee6ddae61582b8b7ac407.tar.gz
src-75b5caa08ef286b484aee6ddae61582b8b7ac407.zip
cam: turn KASSERTs into printfs for now
It looks like I've missed a couple of places where we don't clear stack-allocated CCBs. Don't panic when that happens, just print a warning. This is a temporary measure until I get those cases fixed. Reviewed By: markj Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30296
-rw-r--r--sys/cam/ata/ata_xpt.c8
-rw-r--r--sys/cam/scsi/scsi_xpt.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
index 2e3f862cbf41..08ce945a0938 100644
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -1796,10 +1796,18 @@ ata_action(union ccb *start_ccb)
{
if (start_ccb->ccb_h.func_code != XPT_ATA_IO) {
+#ifdef notyet
KASSERT((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) == 0,
("%s: ccb %p, func_code %#x should not be allocated "
"from UMA zone\n",
__func__, start_ccb, start_ccb->ccb_h.func_code));
+#else
+ if ((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) != 0) {
+ printf("%s: ccb %p, func_code %#x should not be allocated "
+ "from UMA zone\n",
+ __func__, start_ccb, start_ccb->ccb_h.func_code);
+ }
+#endif
}
switch (start_ccb->ccb_h.func_code) {
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 5097802c4063..b88e1869b880 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -2626,10 +2626,18 @@ scsi_action(union ccb *start_ccb)
{
if (start_ccb->ccb_h.func_code != XPT_SCSI_IO) {
+#ifdef notyet
KASSERT((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) == 0,
("%s: ccb %p, func_code %#x should not be allocated "
"from UMA zone\n",
__func__, start_ccb, start_ccb->ccb_h.func_code));
+#else
+ if ((start_ccb->ccb_h.alloc_flags & CAM_CCB_FROM_UMA) != 0) {
+ printf("%s: ccb %p, func_code %#x should not be allocated "
+ "from UMA zone\n",
+ __func__, start_ccb, start_ccb->ccb_h.func_code);
+ }
+#endif
}
switch (start_ccb->ccb_h.func_code) {