[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53c5a56b-81fc-44af-bade-21aea79682f8@web.de>
Date: Sat, 20 Dec 2025 17:09:50 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Haoxiang Li <lihaoxiang@...c.iscas.ac.cn>, linux-scsi@...r.kernel.org,
Hannes Reinecke <hare@...e.com>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Jitendra Bhivare <jitendra.bhivare@...adcom.com>,
Ketan Mukadam <ketan.mukadam@...adcom.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: be2iscsi: fix a memory leak in
beiscsi_boot_get_sinfo()
> If nonemb_cmd->va fails to be allocated, call free_mcc_wrb()
> to restore the impact caused by alloc_mcc_wrb().
avoid?
…
> +++ b/drivers/scsi/be2iscsi/be_mgmt.c
> @@ -1025,6 +1025,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
> &nonemb_cmd->dma,
> GFP_KERNEL);
> if (!nonemb_cmd->va) {
> + free_mcc_wrb(ctrl, tag);
> mutex_unlock(&ctrl->mbox_lock);
> return 0;
> }
I suggest to avoid also repeated mutex_unlock() calls in this function implementation.
Regards,
Markus
Powered by blists - more mailing lists