From owner-svn-src-stable-11@freebsd.org Thu May 9 04:16:32 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60D04159CB78; Thu, 9 May 2019 04:16:32 +0000 (UTC) (envelope-from mav@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0636E755DF; Thu, 9 May 2019 04:16:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C97F7FE47; Thu, 9 May 2019 04:16:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x494GVcb015616; Thu, 9 May 2019 04:16:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x494GVtY015615; Thu, 9 May 2019 04:16:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201905090416.x494GVtY015615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 May 2019 04:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347380 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 347380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0636E755DF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 May 2019 04:16:32 -0000 Author: mav Date: Thu May 9 04:16:31 2019 New Revision: 347380 URL: https://svnweb.freebsd.org/changeset/base/347380 Log: MFC r347198: Drop periph lock around cam_periph_unmapmem(). Since r345656 it may call copyout(), that may sleep. Modified: stable/11/sys/cam/scsi/scsi_pass.c stable/11/sys/cam/scsi/scsi_sg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_pass.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_pass.c Thu May 9 04:16:06 2019 (r347379) +++ stable/11/sys/cam/scsi/scsi_pass.c Thu May 9 04:16:31 2019 (r347380) @@ -2262,7 +2262,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: stable/11/sys/cam/scsi/scsi_sg.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_sg.c Thu May 9 04:16:06 2019 (r347379) +++ stable/11/sys/cam/scsi/scsi_sg.c Thu May 9 04:16:31 2019 (r347380) @@ -916,7 +916,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); }