From patchwork Wed Dec 14 04:50:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 634770 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C42A3C4332F for ; Wed, 14 Dec 2022 04:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237352AbiLNEu7 (ORCPT ); Tue, 13 Dec 2022 23:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237312AbiLNEu3 (ORCPT ); Tue, 13 Dec 2022 23:50:29 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B280AE096 for ; Tue, 13 Dec 2022 20:50:28 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BE3gC9J020064 for ; Tue, 13 Dec 2022 20:50:28 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=DZRs2xdEsR9Le5bfJb6o6h8u8sYGcJ2fFiiWZNbs5mQ=; b=SHCaZ43WYPsvx+XoUH6iEdS+06e4xg9K9beuNkmZZ0E6WGgwG9mgywSeRRWAuGLSKf+E XlYsdOVP3mJQUrSf0uaRh4lgHKE+rwfGaUZFelaGBNsZScEPx0s79SEaK0z+uSjGX5JZ yIL2dgQZM7T7OvzxLV/J1ZEwe1ftMakKlg1mXGZa7JtLXwANQzCw3RDzlAdpCEPTaBs3 f1vsGw0dCFAAP1mFPUgtp7lL79C6HcK919fTIjj7rz9Hz2CzxcECyYal7gnT27Y76B2b +7rR0HwJ9hXVCokxUD4dTfgmsLA2s8I+Dy4bECb2vxRoa13PHU0m0LVOOeq6Yup69B7m bA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mf6tj078c-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 13 Dec 2022 20:50:28 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 13 Dec 2022 20:50:25 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Tue, 13 Dec 2022 20:50:25 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id DE8B53F707A; Tue, 13 Dec 2022 20:50:24 -0800 (PST) From: Nilesh Javali To: CC: , , , Subject: [PATCH 07/10] qla2xxx: Remove unintended flag clearing Date: Tue, 13 Dec 2022 20:50:11 -0800 Message-ID: <20221214045014.19362-8-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20221214045014.19362-1-njavali@marvell.com> References: <20221214045014.19362-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: CCCP6dyN8A0GJox3AKhpiWc1AqFWjsL- X-Proofpoint-GUID: CCCP6dyN8A0GJox3AKhpiWc1AqFWjsL- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-14_02,2022-12-13_01,2022-06-22_01 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran FCF_ASYNC_SENT flag is used in session management. This flag is cleared in task management path by accident. Remove unintended flag clearing. Fixes: 388a49959ee4 ("scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd") Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali --- drivers/scsi/qla2xxx/qla_init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 745fee298d56..6968e8d08968 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -2082,7 +2082,6 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun, done_free_sp: /* ref: INIT */ kref_put(&sp->cmd_kref, qla2x00_sp_release); - fcport->flags &= ~FCF_ASYNC_SENT; done: return rval; }