From nobody Fri Apr 29 23:12:42 2022 X-Original-To: dev-commits-src-branches@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 34E431ABD065; Fri, 29 Apr 2022 23:12:42 +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 4KqpDV3y0gz3wGd; Fri, 29 Apr 2022 23:12:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273962; 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=yCWvfpOVa329IfTLVK7hnmG2kCBlIWa7Pb3HBHnjmV4=; b=ucTZEWDY+kwMAiIlXkCLqsr6GtxBVnnTnizLGohtWVERoKaouyW5dyvpLHCM29bSkWDTxe z1u5JYWftZ//tufyQS463nCeoXR1bPhCFWue0I/EhuiqjbCh7z//BWO/WvRSVZyl8THdmA 1NlZsTf3Irrbbn30sTggm4+QcB+1hnZxv176TSncWYXreQ917RK7QKc5vG1GbUZRhoM7mx Y64b5e4Vem/OEfp4pPLdNxif9823/N//SwyHclmd19hKT0OEVMOT9iO2UzkanLl2+v4Qhs d0GOm2QM7yFzhA7ck56/nulXM+adY/yHu5UQU1PFFvHyfr+vaxkqzWJfqJSTSA== 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 1DD3115EE2; Fri, 29 Apr 2022 23:12:42 +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 23TNCgFm044997; Fri, 29 Apr 2022 23:12:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23TNCgUB044996; Fri, 29 Apr 2022 23:12:42 GMT (envelope-from git) Date: Fri, 29 Apr 2022 23:12:42 GMT Message-Id: <202204292312.23TNCgUB044996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 345739ccaccc - stable/13 - cfiscsi_done: Free the dummy PDU earlier. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 345739ccaccce822a24a5ef9121accce541ed6de Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273962; 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=yCWvfpOVa329IfTLVK7hnmG2kCBlIWa7Pb3HBHnjmV4=; b=KbBIYw1WD16eGwFej4YX/Przb7ZXe6023Z1f4xGfGR43cvKyv2vZ/be43Hf+4jatxe+38n cNYm0d9iuytirJSGKQCHH12mi1uOBYIiAOuTzKecXH9n9mJD5FZbgwBFg5hRN5PJDDdZpP LJ9ABrXR79mAqZ3DMgSvZ7ElQ0YGd7X45vkCpYBSNXjisS0rMqOl0qx1ZaGnIRfrA2iULa cBAqBpVz+BIMU868NqrKPpDd+kgI7SsPJBViJNeLlLcUx6HDSTRqLg2BWr8MS7GbZH0Fa+ oz8qMvLia9MUJ0HKiPb39qKEu7r4gqClXRPnybN8+ZgM7sN5uiN7ZtUH8pYPsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651273962; a=rsa-sha256; cv=none; b=CV9RIKDA7U/l6ODmDHrBmJEXdvcq1JlogxZ2qtNBjh7e2Hjvf5CHm/apiDnOdyPAldcMb8 OwHkfdhCXvhm7EhmmzrAZ9BgFUiGCJNjRZqL9Bzh+ubMW/eArWeUZKOXSl71QpWPU53FpU +4MhptO5dhDu/7HGz6UDHpAwmg7Q8JdfRI9UHJRbtzP0ZcuXTtw6QYzLg5higUydghJPXA TrPCaRjYlM08LP0rwgfuEbwmwqMwmI8c5i5r0xYwBopur8DjwLNhTZixKZ/ieE5HpaDUf2 L+PIGQdW5bbC7OAFCzhinmi4HqW7X3ksDZqSKeLCuVrcefGiHbA1TA5XS+5gUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=345739ccaccce822a24a5ef9121accce541ed6de commit 345739ccaccce822a24a5ef9121accce541ed6de Author: John Baldwin AuthorDate: 2022-02-07 20:55:08 +0000 Commit: John Baldwin CommitDate: 2022-04-29 23:07:49 +0000 cfiscsi_done: Free the dummy PDU earlier. The dummy PDU needs to be freed before marking task abortion complete as otherwise cfiscsi_session_terminate_tasks can return and destroy the session in another thread before the PDU is freed. Fixes: 2e8d1a55258d iscsi: Allocate a dummy PDU for the internal nexus reset task. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34176 (cherry picked from commit a3d71fffa78619fb394b8bb595d2ef680bd0e43a) --- sys/cam/ctl/ctl_frontend_iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 1d7ed8ef87ef..87cf173ca8fe 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -3062,11 +3062,11 @@ cfiscsi_done(union ctl_io *io) /* * Implicit task termination has just completed; nothing to do. */ + icl_pdu_free(request); cs->cs_tasks_aborted = true; refcount_release(&cs->cs_outstanding_ctl_pdus); wakeup(__DEVOLATILE(void *, &cs->cs_outstanding_ctl_pdus)); ctl_free_io(io); - icl_pdu_free(request); return; default: panic("cfiscsi_done called with wrong opcode 0x%x",