Date: Mon, 6 May 2019 19:08:04 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347198 - head/sys/cam/scsi Message-ID: <201905061908.x46J84w2098868@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon May 6 19:08:03 2019 New Revision: 347198 URL: https://svnweb.freebsd.org/changeset/base/347198 Log: Drop periph lock around cam_periph_unmapmem(). Since r345656 it may call copyout(), that may sleep. MFC after: 3 days Sponsored by: iXsystems, Inc. Modified: head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Mon May 6 18:50:08 2019 (r347197) +++ head/sys/cam/scsi/scsi_pass.c Mon May 6 19:08:03 2019 (r347198) @@ -2261,7 +2261,9 @@ passsendccb(struct cam_periph *periph, union ccb *ccb, /* sense_flags */ SF_RETRY_UA | SF_NO_PRINT, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); ccb->ccb_h.cbfcnp = NULL; ccb->ccb_h.periph_priv = inccb->ccb_h.periph_priv; Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Mon May 6 18:50:08 2019 (r347197) +++ head/sys/cam/scsi/scsi_sg.c Mon May 6 19:08:03 2019 (r347198) @@ -915,7 +915,9 @@ sgsendccb(struct cam_periph *periph, union ccb *ccb) SF_RETRY_UA, softc->device_stats); + cam_periph_unlock(periph); cam_periph_unmapmem(ccb, &mapinfo); + cam_periph_lock(periph); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905061908.x46J84w2098868>