Date: Sun, 16 May 2021 19:19:35 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 75b5caa08ef2 - main - cam: turn KASSERTs into printfs for now Message-ID: <202105161919.14GJJZu0074697@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=75b5caa08ef286b484aee6ddae61582b8b7ac407 commit 75b5caa08ef286b484aee6ddae61582b8b7ac407 Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2021-05-16 19:11:46 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> CommitDate: 2021-05-16 19:19:19 +0000 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 --- sys/cam/ata/ata_xpt.c | 8 ++++++++ sys/cam/scsi/scsi_xpt.c | 8 ++++++++ 2 files changed, 16 insertions(+) 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105161919.14GJJZu0074697>