Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2804819pxb; Thu, 10 Feb 2022 06:03:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTJ/1BYt8tNolaBWdy88bbUugwGmDa56lspN0onRopTEPimA/CNE/x43yExXnUB2ifMBOt X-Received: by 2002:a17:906:edc5:: with SMTP id sb5mr6590512ejb.83.1644501831171; Thu, 10 Feb 2022 06:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644501831; cv=none; d=google.com; s=arc-20160816; b=ZPpluuF7w91AUzpHkISC5NpjzEcQqJSfkvCGkm0Cn1M2sJF4WuMG5zilFNQ7J+xH5f vWTfWHTnPbYuTn8e38TczR+DmaJlcVCL982rccXDT8+pNNuQoXB5z6SCWZxo3RutPVx+ k3Los2tMkeg9HXyX6ak2tFHwGFmfMWk586qxShifyZ7QhHG4HB/5NjidQtN80u5si8tB 5V3stf3dw+Ly1BgkKB4jhAigEBK58E75yjaLZHLGcpHf0qJNc0L86HzwgiXmaBzmWRUh 9S4O49eBWSTbEpoo6DnLFLUy5totAUj4acIFM1zcPgWL6jsEIEScmPs0ek11gNzJdkcn 19Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=oaDfj4+HUernAh+2GUbjJKOfYTJL3BwJ7tqTAIqrpi8=; b=qgObKmiGkpGXculAKrlJsYsSzOeaVy0GqN4kC8Q+3TPdA7RZhRUhOITVeK0Nzym4x3 iAeM7kQIRk9uuugUq/gE+Vm62n1qoBfZGyw24ABFKpLiPhed5ie6OWw846Ge2rYQHYrp H73zSbTOAE+HCCtjxfck9HKt2cMPDh5Q7/VX/+rztUqD6WsqKwF4wfuesKcE1CtfN5bE qAam3BHDJbaIu3wqxbl6HGW/VO2wQiNib/mHiSZR2EwR5/nLlY0VO8M/caYQKLDG3iJf LEJFy9Q2X3kG1gY+QZYGRTyF7D1CRnR9Mx6P7wlFRD5RwmNiXzC4u38hEC6c/UySkqb+ n/rA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4si13391662edj.100.2022.02.10.06.03.23; Thu, 10 Feb 2022 06:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240156AbiBJKst (ORCPT + 99 others); Thu, 10 Feb 2022 05:48:49 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240064AbiBJKss (ORCPT ); Thu, 10 Feb 2022 05:48:48 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07047FFE; Thu, 10 Feb 2022 02:48:49 -0800 (PST) Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JvYQ0087zz6892w; Thu, 10 Feb 2022 18:48:40 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 10 Feb 2022 11:48:46 +0100 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 10 Feb 2022 10:48:43 +0000 From: John Garry To: , , , , CC: , , , , , "John Garry" Subject: [PATCH 0/2] scsi: libsas: Drop SAS_TASK_AT_INITIATOR Date: Thu, 10 Feb 2022 18:43:22 +0800 Message-ID: <1644489804-85730-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apart from some isci driver code, flag SAS_TASK_AT_INITIATOR is only set, so drop usage in that driver and then everywhere else. This solves a use-after-free in the pm8001 queue path. John Garry (2): scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task() scsi: libsas: Drop SAS_TASK_AT_INITIATOR drivers/scsi/aic94xx/aic94xx_task.c | 9 --------- drivers/scsi/hisi_sas/hisi_sas_main.c | 8 +------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 +-- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 +-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- drivers/scsi/isci/request.c | 15 +++++---------- drivers/scsi/isci/request.h | 5 ++++- drivers/scsi/isci/task.c | 23 +++++++++-------------- drivers/scsi/mvsas/mv_sas.c | 6 +----- drivers/scsi/pm8001/pm8001_hwi.c | 7 ------- drivers/scsi/pm8001/pm8001_sas.c | 4 ---- drivers/scsi/pm8001/pm80xx_hwi.c | 5 ----- include/scsi/libsas.h | 1 - 13 files changed, 23 insertions(+), 69 deletions(-) -- 2.26.2