Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2797114pxb; Sun, 3 Apr 2022 21:51:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypZQx2Q6XsMsq1V2Xy3p/m0FXqy0flfgwhW4LU1IjL7luTWCZ9tX16+kqbIxsBen6W/CCT X-Received: by 2002:a17:907:6d0e:b0:6d7:c85:5bf5 with SMTP id sa14-20020a1709076d0e00b006d70c855bf5mr9422465ejc.31.1649047873862; Sun, 03 Apr 2022 21:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649047873; cv=none; d=google.com; s=arc-20160816; b=iKoipgdizVngRtx/UqrRXxq4l2Rw+EnpGzf8p8dcxmggRcrJMsIOp8x99JKGTS+fN2 9PGju17jExywMpROpSsBEcio54XUQx4ELIvETRmqRGZ5e4QrXhMO/tSbcDQ6mRDakYo4 wg3tYnBuPeBycd9JiTFMTRQ0RLFresLHaM8txrXaZtuBeF/pzgk61oATD47r/GdiRXR7 5d4FJ7x+R2F+z8/8b1BOusS/XfNSeu05Q8slUf5BEjR2rX7CigCZ8ZyUlcRItXyZHTJz KoxyGncBGvX2GVBUKIS6yicfq1eYzp8ob10/j1x5N+9tP6fzdgt232zwjxsfGwTL5WBm Jt9A== 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=OrKg84lEqipPOZCpn0hB4t2+OJvWX6WRfvpvdZQ65zc=; b=PjF66n2HqntN4P1Wq0NzoezpawfV5mip4pK+4drAG8603cVWaYNnCVBsaDL8UeMtuR 6rkxEMtn8bFyQK8vLu/2Ypy8KxVGuQyaWjFiMpGv2zuk+Tshn4+KsJznrNUeIlbl6ODn yAMFJq4ykyhrqUyDecBAotkb9wjk+saYwIhdPDOmYDqcq2xn63TdaCAxfIW5Q1Pe8L9r ct46HWRvJUQy5sDgwZNJD0KFjZFNjuj7aeQbF2iNr8SbElhJH5H2FeVUmgH6FcGCAL8o ALYyxqd6MbxK1VaBnPP7wUEDRfCNp4UYpy1jUNf6w/fth9cbLkOSBc05pH5o6QIHMjVS 87Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jn3YxOyT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a056402084e00b00418c2b5bea8si6615833edz.394.2022.04.03.21.50.49; Sun, 03 Apr 2022 21:51:13 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jn3YxOyT; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352685AbiDAOv0 (ORCPT + 99 others); Fri, 1 Apr 2022 10:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347431AbiDAOcd (ORCPT ); Fri, 1 Apr 2022 10:32:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFEE11EF5DE; Fri, 1 Apr 2022 07:29:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7CB0C61CA5; Fri, 1 Apr 2022 14:29:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEA1BC36AE7; Fri, 1 Apr 2022 14:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648823349; bh=b4N+z6FopKlLDYmYSoHSZPjtoX/twsqFFhVmfg3OMJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jn3YxOyTC2F6JqFur5dXPuUU0IZzlfEIkosGwaL9f/FQilcYzb3rY2RHqnm1KBg7d hgVIf8HZNJYEFt6XSrTNC8grNJlcWQbvyFty2W9afiL/TXhH7Uveg0C8rWea82/lKb 8MPd0dH4b8tduEIFirHVNfoos0IUAd1WY2H8qubILA7Q8nFVxuBPP3tgQ4UQvtLfJ3 Ck61iqgDLOFjv9LUEUwLhIY8r8OOi6ALLiywAwzsXUF4xsUZRBTcJmlcpUZILMdO5G tlAzbHTZXJ8zoHDVPvtg9isdHnbjijb3AmfBEVldVMYLXUvuieeFcHv4l1EwPSX3zf TK2rYptQFvngQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sreekanth Reddy , "Martin K . Petersen" , Sasha Levin , sathya.prakash@broadcom.com, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, jejb@linux.ibm.com, mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.17 068/149] scsi: mpi3mr: Fix memory leaks Date: Fri, 1 Apr 2022 10:24:15 -0400 Message-Id: <20220401142536.1948161-68-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220401142536.1948161-1-sashal@kernel.org> References: <20220401142536.1948161-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Sreekanth Reddy [ Upstream commit d44b5fefb22e139408ae12b864da1ecb9ad9d1d2 ] Fix memory leaks related to operational reply queue's memory segments which are not getting freed while unloading the driver. Link: https://lore.kernel.org/r/20220210095817.22828-9-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 7193b983ee3b..e44868230197 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1520,7 +1520,7 @@ static void mpi3mr_free_op_req_q_segments(struct mpi3mr_ioc *mrioc, u16 q_idx) MPI3MR_MAX_SEG_LIST_SIZE, mrioc->req_qinfo[q_idx].q_segment_list, mrioc->req_qinfo[q_idx].q_segment_list_dma); - mrioc->op_reply_qinfo[q_idx].q_segment_list = NULL; + mrioc->req_qinfo[q_idx].q_segment_list = NULL; } } else size = mrioc->req_qinfo[q_idx].segment_qd * -- 2.34.1