From patchwork Thu Feb 10 09:58:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12741638 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 97902C43219 for ; Thu, 10 Feb 2022 09:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239005AbiBJJs6 (ORCPT ); Thu, 10 Feb 2022 04:48:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239033AbiBJJst (ORCPT ); Thu, 10 Feb 2022 04:48:49 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D06941DD for ; Thu, 10 Feb 2022 01:48:50 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id i186so9378745pfe.0 for ; Thu, 10 Feb 2022 01:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=37W0+LXVb0xfQ7YySXuGS7NF0kKte20NaaM+ZJ37vTk=; b=BEi/1evvikqrxH50Af15f5I/u+ChOdU3Uzjj1LGiJ3WC/Y8l25eGgjqa/hELl0PKu3 R26UDvcwFip0bBYJHA7tqy7RulML+QVL5mU9YW2yuhxClzkmPoxaqioLQqbzrs9anj5k yH8GpzlMoIRh2+Ro+SoKEW52O1V3X6lA0RZ5o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=37W0+LXVb0xfQ7YySXuGS7NF0kKte20NaaM+ZJ37vTk=; b=gSasNVxvnp/KeMgbCxTcVwu7O5gpswjvkGmGeo9QG9B2dETDdwccMTOI7DAXrDuFdo E6jmslKTJi4K7INtBkneCW6zXv161sdyyIf6XvKryv4StsuPPxHawR4qr+USRh/PRgOZ Fg26RQCFuItCX6JAi5rhaa2MfgINgymIzNmJtqMr3gOndWuMMpjrvymee53d234n9+3j YuoyLQx6eGd/oMl6CISbPtNx+S5l4ZsuGiuWTSMBoq11ai/49ArdaYUJWnYM7GkN5PaM i/GsCEV+cD+TA9fPbB2U5NxCakGN7NXj4M7zN1bmVdemRy3j0KUrhQD/SzcFWqhXcbSC ngEw== X-Gm-Message-State: AOAM532hPjtnGWq5hNdQV+W3052NUM7amAv52y4/gnXaZhm8i2mYjE+E mMxpTTwR33KlOjxB2QqCNvubCxWYOeAZk1LBSIGnl/KxOhV4P/y50zys7r3qrvtSU/a4gqR+dpw RDy5QLYgDQ8ns2GYPl5ZBSsmi4+bHB01yw3QzoYGB4bfM5x4J/+lK3++gleZ2W6slBKoRZuwd3I XS8Vj75UxLrHI= X-Google-Smtp-Source: ABdhPJzrOUDFXwMz9PoCk1i6GXkxXK1cGvABepF0pMZ/TmVOLt9ZmzWdosEUM4bZBHWBN3hRw9dxBg== X-Received: by 2002:a05:6a00:8c5:: with SMTP id s5mr6732114pfu.18.1644486529110; Thu, 10 Feb 2022 01:48:49 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:48 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 8/9] mpi3mr: Fix memory leaks Date: Thu, 10 Feb 2022 15:28:16 +0530 Message-Id: <20220210095817.22828-9-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix memory leaks related to operational reply queue's memory segments which are not getting freed while unloading the driver. Signed-off-by: Sreekanth Reddy --- 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 f148446..e25c024 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1517,7 +1517,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 *