mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Don.Brace@microchip.com>
To: <haoxiang_li2024@163.com>
Cc: <James.Bottomley@HansenPartnership.com>,
	<martin.petersen@oracle.com>, <david.carroll@microsemi.com>,
	<justin.lindley@microsemi.com>, <scott.teel@microsemi.com>,
	<storagedev@microchip.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>
Subject: Re: Re:Re: [PATCH] scsi: hpsa: fix DMA mapping leak on IOACCEL2 reset path
Date: Wed, 24 Jun 2026 14:06:43 +0000	[thread overview]
Message-ID: <SJ2PR11MB8369F4ADD8F072D04B62BC5EE1ED2@SJ2PR11MB8369.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3881ced5.4b48.19ef8408558.Coremail.haoxiang_li2024@163.com>

________________________________________
From: haoxiang_li2024 <haoxiang_li2024@163.com>
Sent: Wednesday, June 24, 2026 1:10 AM
To: Don Brace - C33706 <Don.Brace@microchip.com>
Cc: James.Bottomley@HansenPartnership.com <James.Bottomley@HansenPartnership.com>; martin.petersen@oracle.com <martin.petersen@oracle.com>; david.carroll@microsemi.com <david.carroll@microsemi.com>; justin.lindley@microsemi.com <justin.lindley@microsemi.com>; scott.teel@microsemi.com <scott.teel@microsemi.com>; storagedev <storagedev@microchip.com>; linux-scsi@vger.kernel.org <linux-scsi@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; stable@vger.kernel.org <stable@vger.kernel.org>
Subject: Re:Re: [PATCH] scsi: hpsa: fix DMA mapping leak on IOACCEL2 reset path
 
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

On 2026-06-23 02:26:42,Don.Brace@microchip.com wrote:

>Fixes: c5dfd106414f ("scsi: hpsa: correct device resets")
>Cc: stable@vger.kernel.org
>Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
>
>Acked-by: Don Brace <don.brace@microchip.com
>Thanks for your patch. Can fix potential performance issues with devices undergoing resets.
>What about another patch for when call to hpsa_map_ioaccel2_sg_chain_block() fails?
>

>

Thanks for your review! I checked the hpsa_map_ioaccel2_sg_chain_block() failure path. It
already decrements ioaccel_cmds_out and calls  scsi_dma_unmap(cmd). I think this patch
is enough?

Yes, good enough.
Thanks for checking.
>---
> drivers/scsi/hpsa.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
>index a1b116cd4723..8edad1830abe 100644
>--- a/drivers/scsi/hpsa.c
>+++ b/drivers/scsi/hpsa.c
>@@ -5017,6 +5017,10 @@ static int hpsa_scsi_ioaccel2_queue_command(struct ctlr_info *h,
>
>        if (phys_disk->in_reset) {
>                cmd->result = DID_RESET << 16;
>+               atomic_dec(&phys_disk->ioaccel_cmds_out);
>+               scsi_dma_unmap(cmd);
>+               if (use_sg > h->ioaccel_maxsg)
>+                       hpsa_unmap_ioaccel2_sg_chain_block(h, cp);
>                return -1;
>        }
>
>--
>2.25.1

Thanks,
Haoxiang

  reply	other threads:[~2026-06-24 14:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 16:00 Haoxiang Li
2026-06-22 18:26 ` Don.Brace
2026-06-24  6:10   ` haoxiang_li2024
2026-06-24 14:06     ` Don.Brace [this message]
2026-07-13  2:32 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ2PR11MB8369F4ADD8F072D04B62BC5EE1ED2@SJ2PR11MB8369.namprd11.prod.outlook.com \
    --to=don.brace@microchip.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=david.carroll@microsemi.com \
    --cc=haoxiang_li2024@163.com \
    --cc=justin.lindley@microsemi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=scott.teel@microsemi.com \
    --cc=stable@vger.kernel.org \
    --cc=storagedev@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox