Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144773pxv; Fri, 9 Jul 2021 19:25:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLGJSD6xNyc/6DmTs4DeZOojx+bU7XQ+5LhaKsIbmquRUwam9+HMkABoCqwZo5HxtQ+yvI X-Received: by 2002:a05:6402:1103:: with SMTP id u3mr50592817edv.342.1625883957422; Fri, 09 Jul 2021 19:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883957; cv=none; d=google.com; s=arc-20160816; b=dt92Q2vP34lPUV6rUjfQ1/iGV8ieYW2hpcubjyNUm7PN2PCGRD7GDOaGcSDMXFUNM4 eDqubEZ7wx+NESC7Pwpc4OTqrTVS6lvnBj2m+H6Mb2IUHYVc2g7cP2/sDDG/2vOTI8Ld aAIzQfpF195vles9CisBAw/Cz/OBdIHf4IWdHhQU0NmxxoNcxyr/w6dbvOlY8Q7FE9F3 unyuPG/COW5fIa1y/XvMC3gPZCJq18QcdVQDmUyTLDSngWTUOD5D61YZ12EMgaNSK+y8 GMWlFdy4b62MVlTVjo517uNfk6bON5FBijwlo/eVd9qMBi4x6l271Al7uvtvrPgixxBt Ossg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JaSjdnvVKWjMXGsokPwU5D2JGbLqEnS/VFziRm8J5+0=; b=UXjR0fITmv9ka+ForeVDyRe8RJlboVKcEwm4hTxyXCnPgaPIURS2R8h1NeXjshqJeL XDWJBwSXGgABCwnaIgBmJTDUMLv72RAW4Q2QQMf8Q7h0NDt7puoRiFbP4i8h+2kFzogB 9qy0GQWArmh/8wM4exIvnvjwjzYApBxExvNy0zq/qZKo6JL5fziq4/XU+EzgqKnk/giY gVyB2KDjK3ogHEkHjiksJsO77HxHyojUNHyxAtOBNVwJyfUtVnqoipdM9t5/0ake+/dC XlSGCip4mHQVLNGCNWbvzG51B0YtZoO4SpSv9Lwbh9dl2Po+ZF992Xz2za3UINSkFAap MJKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cxZB5b0d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si10983893edd.117.2021.07.09.19.25.34; Fri, 09 Jul 2021 19:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cxZB5b0d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232422AbhGJC0l (ORCPT + 99 others); Fri, 9 Jul 2021 22:26:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:42926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233132AbhGJCZk (ORCPT ); Fri, 9 Jul 2021 22:25:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 82D54613C3; Sat, 10 Jul 2021 02:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883776; bh=bx2NjaHIi7EIzUuk5t5pEMwJV/11m704jcJmZ6JoNMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cxZB5b0doKe6WDI3jyvksRNQzuvilOdIWSJ/Zfo1bW+STwjZvyYegjv+S/hSo3eUu sf7m8Qa5wfBoG9WFMbuKiHpdSHpC2j7WEXYdIdAlA7+Yg3V2Cyv2YI02LZ4N08MzOi WbMOdZP/U1IXWfEZKcNV6yC2mnwby3GwCfO9PriKBoCvlckzOYLbOPVK83pCSUxRd/ 59oIVbRekORxOioZ4X8uMbolSnVNeUt38xXG3npwmxFiJ++JE9Ee0J6TDY3QqMwQB0 qtdfBAW1xs2fNN19IcgHo4DMUKkGs4N/YlaxTgqWxqLJkdXDZYbQf9eW5erbgk/HXF sXOrgwAAV3KDA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mike Christie , Manish Rangankar , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.12 045/104] scsi: qedi: Fix TMF session block/unblock use Date: Fri, 9 Jul 2021 22:20:57 -0400 Message-Id: <20210710022156.3168825-45-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Christie [ Upstream commit 2819b4ae2873d50fd55292877b0231ec936c3b2e ] Drivers shouldn't be calling block/unblock session for tmf handling because the functions can change the session state from under libiscsi. iscsi_queuecommand's call to iscsi_prep_scsi_cmd_pdu-> iscsi_check_tmf_restrictions will prevent new cmds from being sent to qedi after we've started handling a TMF. So we don't need to try and block it in the driver, and we can remove these block calls. Link: https://lore.kernel.org/r/20210525181821.7617-25-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qedi/qedi_fw.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index c12bb2dd5ff9..4c87640e6a91 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -159,14 +159,9 @@ static void qedi_tmf_resp_work(struct work_struct *work) set_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); resp_hdr_ptr = (struct iscsi_tm_rsp *)qedi_cmd->tmf_resp_buf; - iscsi_block_session(session->cls_session); rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true); - if (rval) { - iscsi_unblock_session(session->cls_session); + if (rval) goto exit_tmf_resp; - } - - iscsi_unblock_session(session->cls_session); spin_lock(&session->back_lock); __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0); -- 2.30.2