From owner-dev-commits-src-main@freebsd.org Sun May 16 19:19:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09EE762DF65; Sun, 16 May 2021 19:19:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FjsX76rXXz3MqF; Sun, 16 May 2021 19:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D173E1E2AE; Sun, 16 May 2021 19:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14GJJZOi074699; Sun, 16 May 2021 19:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14GJJZu0074697; Sun, 16 May 2021 19:19:35 GMT (envelope-from git) Date: Sun, 16 May 2021 19:19:35 GMT Message-Id: <202105161919.14GJJZu0074697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 75b5caa08ef2 - main - cam: turn KASSERTs into printfs for now MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75b5caa08ef286b484aee6ddae61582b8b7ac407 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2021 19:19:36 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=75b5caa08ef286b484aee6ddae61582b8b7ac407 commit 75b5caa08ef286b484aee6ddae61582b8b7ac407 Author: Edward Tomasz Napierala AuthorDate: 2021-05-16 19:11:46 +0000 Commit: Edward Tomasz Napierala 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) {