Date: Sat, 15 Feb 2020 18:14:24 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357969 - head/sys/cam Message-ID: <202002151814.01FIEOgY050587@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Sat Feb 15 18:14:23 2020 New Revision: 357969 URL: https://svnweb.freebsd.org/changeset/base/357969 Log: The KASSERT is too strict: revert r357897 It's valid for a periph to be removed with outstanding transactions on the device. In CAM, multiple periphs attach to a single device. There's no interlock to prevent one of these going away while other periphs have outstanding CCBs and it's not an error either. Remove this overly agressive KASSERT to prevent false-positive panics when devices depart. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Sat Feb 15 18:03:16 2020 (r357968) +++ head/sys/cam/cam_periph.c Sat Feb 15 18:14:23 2020 (r357969) @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include <cam/cam_periph.h> #include <cam/cam_debug.h> #include <cam/cam_sim.h> -#include <cam/cam_xpt_internal.h> /* For KASSERTs only */ #include <cam/scsi/scsi_all.h> #include <cam/scsi/scsi_message.h> @@ -682,10 +681,6 @@ camperiphfree(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); KASSERT(periph->periph_allocating == 0, ("%s%d: freed while allocating", periph->periph_name, periph->unit_number)); - KASSERT(periph->path->device->ccbq.dev_active == 0, - ("%s%d: freed with %d active CCBs\n", - periph->periph_name, periph->unit_number, - periph->path->device->ccbq.dev_active)); for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) { if (strcmp((*p_drv)->driver_name, periph->periph_name) == 0) break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002151814.01FIEOgY050587>