From nobody Thu Sep 26 01:12:26 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XDbDV4vH7z5XyXF; Thu, 26 Sep 2024 01:12:26 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDbDV4GSZz4Jm7; Thu, 26 Sep 2024 01:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rd7oYLUz4hqVVa181sz26Y+VyywRvKXOPJwhQDg3kY8=; b=t790uoPYWCkbpOdtAcaByBWsAwLJt7Tttj83wZvhsLuR6plaSp6BVrGEgAiouJH+ytwk3S JN+bRUewKShcUuL7sGILlbJ31cinLLfWVDRWTxMYK/fLsy6c1LMuZxCfCM2oQ+iSjMrYkI uljPoMNfTU4CfR171Oi5d0biV1EiCK+WVn4W0r0sIQJ3Xsq4IYkKFqy/nRDwssN33SCWki uKuKXcVhSLjG2jM/aY2U6Ivz5MJ+m18aLHCs+l4tIZqTmP2jhzFd2uMRWzotnKsZiVr206 YYMI5zCOAk83TrbrXoNB3iK6RqiuUPE/RSX/XqkRgVPdkBNrIjnaDhwo6QYwUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rd7oYLUz4hqVVa181sz26Y+VyywRvKXOPJwhQDg3kY8=; b=IHNyLJr9bcU4RMjm86LAoOKbh4zPCnNN5/d1uLELa6GeljiK9A4iZAVBpAAtgV/qGx3Lmu 2PdcZfVKYfIjkbRD9D9yGUvLqLbhqPL6VdWZlLHAHxHEvWxXDiJaUIvx+6Pj1Qr9K9DVOq SBBCapH0ZqUuc1grkNkKqBu8hsFhPQLEIlnTEdYOCfbGyR0T6i4TPSRIaAKjiECdX/m6Hn iAaPODt0ysxf8WOrvCeWU9ocRMGh98IlD92ArqNntNsd2tG1b2qS6eTcnBJ+QCvA7lN1X1 dn9zFDJ2wzsDye8z/nkaws6HDHxwf5CUhzLAGk/jNPjANe9tNPjJfoZJpaxZBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727313146; a=rsa-sha256; cv=none; b=oMAS6tiNYyZ/SFaucZ2wA35CJGsSsM+1H7ot1d0p6gdPV3VC5o5Hht19yyuyjBCieXKyzR D9Umo4DHhjjvgzOLfCAUC9rqA09PjTHUuma2tPRYkTkfGdIEVtO3+tITTVihqwu189QDFT NdOGhXB6WTT/X0a4Sp3iVyL6xijukBCMxnhfsrNw7sp+Ypqt1V8k+JFwgPMYtUas7EYXo/ Ar41NmU9GOUdmX1kssNa5oI/0oblAkwvg5KdkEHlcLoMMZn0bh7qI8jTiiqZTTrSuk/lPS LPLr6ECoycdQuK5sAOMG6gPWd2m3cae6OCkpQeYULMhxQVHZzKz+zJecx6f5HQ== 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 4XDbDV3tlrzc35; Thu, 26 Sep 2024 01:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48Q1CQmw060877; Thu, 26 Sep 2024 01:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q1CQB9060874; Thu, 26 Sep 2024 01:12:26 GMT (envelope-from git) Date: Thu, 26 Sep 2024 01:12:26 GMT Message-Id: <202409260112.48Q1CQB9060874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: aec2ae8b57fc - main - nvmf: Always use xpt_done instead of xpt_done_direct List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 commit aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 Author: John Baldwin AuthorDate: 2024-09-26 01:10:44 +0000 Commit: John Baldwin CommitDate: 2024-09-26 01:10:44 +0000 nvmf: Always use xpt_done instead of xpt_done_direct The last reference on a pending I/O request might be held by an mbuf in the socket buffer. When this mbuf is freed, the I/O request is completed which triggers completion of the CCB. However, this can occur with locks held (e.g. with so_snd locked when the mbuf is freed by sbdrop()) raising a LOR between so_snd and the CAM device lock. Instead, defer CCB completion processing to a thread where locks are not held. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvmf/host/nvmf_sim.c b/sys/dev/nvmf/host/nvmf_sim.c index 4bf68553cb49..8850174edf24 100644 --- a/sys/dev/nvmf/host/nvmf_sim.c +++ b/sys/dev/nvmf/host/nvmf_sim.c @@ -58,7 +58,7 @@ nvmf_ccb_done(union ccb *ccb) xpt_done(ccb); } else { ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done_direct(ccb); + xpt_done(ccb); } }