From patchwork Fri Oct 20 19:50:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 156299 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp1290469vqb; Fri, 20 Oct 2023 12:51:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH77IKNeA59nlj6hPXBrAOFTwQDS/AhSv51dxJJgT6VAIN0xSGUR2IGfC1t2MrzKDHAOjk+ X-Received: by 2002:a05:6a00:2daa:b0:68f:b5cb:ced0 with SMTP id fb42-20020a056a002daa00b0068fb5cbced0mr3102637pfb.34.1697831497526; Fri, 20 Oct 2023 12:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697831497; cv=none; d=google.com; s=arc-20160816; b=RCaKStbRDkdIHdhQOF+uWBLwK7Dje1f/JC47Z6JqEdMQO2/JkTCL+KK6T2g6OMCbFy QpPKUnqjnHTXg4B2jLm71/uNv3dTogcb56qPAOkkMu1Rn1LpKOHXIs4fnunyLNCo5V5J aetUIMoOAgygokrhqkA3QCEgJsvwlwDMszxXSFciXnG9WSKcmkq8R31kE7FOJ7kPLc28 dOhjdprnuOKuqJsiwCYgMhwOeTOAejz3xa9jJ+pEABz1CU/9YX1IMl/7SiD4fwZsSQFk jbP7Lh3W6eIWhdXPJB22A5K1iMbSkFA5UYXHFA+I19s+Mybj6yDAKcwUOV+Uj0EjjXxz Syxg== 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 :user-agent:date:cc:to:from:subject:message-id:dkim-signature :dkim-signature; bh=xCITd8pnGr6IPb5NJmtudFKprpJSxXrlueoOjcDRxV8=; fh=bF6hBOtsqZ0IG+YnlrEaFQ/qkylncIJARoC6oO9o4Qw=; b=y2gxu7U70+QPRsXqe7v+7YN9FdG4J09A6Rurck1PQhYSLdT9UB+UQX42gHfri3aHoz TL/B1WVuQDjZ3WKcwKK4E1Q9fzRaO4h3Hhe32ybhHyTHp0XWjB6FTMrm/Wnsa2iIOonZ RNrl67OuPVE8dVCNxK4SR17ZzjEDBQp6qbHrznFBN3tGa3CynZcncJlYFuDQ+lC9ZHz5 E/exfgmt9+95VvxH6X9LOEdEDzxFwvFpIIvMvV0LrHQiKk2Yr8nRZV4kvHWJmiReR1rZ ykO0XjP0dib8KtBmff4dtlbLTn6VUyPiOSF132gVAO6tsxnNSiRUDKXMfyqMgrefpskb seAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=RvR53+UV; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=RvR53+UV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id fb40-20020a056a002da800b0068e45c6ca3fsi2715535pfb.93.2023.10.20.12.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 12:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=RvR53+UV; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=RvR53+UV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4FAE180465E0; Fri, 20 Oct 2023 12:50:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbjJTTum (ORCPT + 26 others); Fri, 20 Oct 2023 15:50:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjJTTul (ORCPT ); Fri, 20 Oct 2023 15:50:41 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [IPv6:2607:fcd0:100:8a00::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4041D63; Fri, 20 Oct 2023 12:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1697831439; bh=dfBUDh2+NLuZET4aeDkcgmhLoPDIT0AK75Zd69ihX9A=; h=Message-ID:Subject:From:To:Date:From; b=RvR53+UVIQnZnBlSViZ91wypAhERtgDaRA0wbwIYm6A9fQF1oMX2YfISgpMhXbELT wqE70CIICWMOwRmBHOJJf1He04IHMEC1UwA6d47seyZYxDtriGKmCgJ5Jr3ctj0A5l wZ+AGXcTMHcUzEVfywjds+WoB9SIjQ/Sty41n7pU= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 560E71287297; Fri, 20 Oct 2023 15:50:39 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavis, port 10024) with ESMTP id g51m-Gd8AxHp; Fri, 20 Oct 2023 15:50:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1697831439; bh=dfBUDh2+NLuZET4aeDkcgmhLoPDIT0AK75Zd69ihX9A=; h=Message-ID:Subject:From:To:Date:From; b=RvR53+UVIQnZnBlSViZ91wypAhERtgDaRA0wbwIYm6A9fQF1oMX2YfISgpMhXbELT wqE70CIICWMOwRmBHOJJf1He04IHMEC1UwA6d47seyZYxDtriGKmCgJ5Jr3ctj0A5l wZ+AGXcTMHcUzEVfywjds+WoB9SIjQ/Sty41n7pU= Received: from lingrow.int.hansenpartnership.com (unknown [IPv6:2601:5c4:4302:c21::a774]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 918901287296; Fri, 20 Oct 2023 15:50:38 -0400 (EDT) Message-ID: <6aaeacbf526de186b21b2061fcf3a4d777e8563f.camel@HansenPartnership.com> Subject: [GIT PULL] SCSI fixes for 6.6-rc6 From: James Bottomley To: Andrew Morton , Linus Torvalds Cc: linux-scsi , linux-kernel Date: Fri, 20 Oct 2023 15:50:37 -0400 User-Agent: Evolution 3.42.4 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 12:50:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780305360141073211 X-GMAIL-MSGID: 1780305360141073211 Two small fixes, both in drivers. The mptsas one is really fixing an error path issue where it can leave the misc driver loaded even though the sas driver fails to initialize. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes Quinn Tran (1): scsi: qla2xxx: Fix double free of dsd_list during driver load Tomas Henzl (1): scsi: mpt3sas: Fix in error path And the diffstat: drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++- drivers/scsi/qla2xxx/qla_os.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) With full diff below James diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index c3c1f466fe01..605013d3ee83 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -12913,8 +12913,10 @@ _mpt3sas_init(void) mpt3sas_ctl_init(hbas_to_enumerate); error = pci_register_driver(&mpt3sas_driver); - if (error) + if (error) { + mpt3sas_ctl_exit(hbas_to_enumerate); scsih_exit(); + } return error; } diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 50db08265c51..dcae09a37d49 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4953,7 +4953,7 @@ qla2x00_mem_free(struct qla_hw_data *ha) ha->gid_list = NULL; ha->gid_list_dma = 0; - if (!list_empty(&ha->base_qpair->dsd_list)) { + if (ha->base_qpair && !list_empty(&ha->base_qpair->dsd_list)) { struct dsd_dma *dsd_ptr, *tdsd_ptr; /* clean up allocated prev pool */