Re: [PATCH v2] scsi: hpsa: enlarge controller and IRQ name buffers

From: Don.Brace

Date: Wed Apr 01 2026 - 09:59:17 EST



From: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
Sent: Wednesday, April 1, 2026 7:05 AM
To: Don Brace - C33706 <Don.Brace@xxxxxxxxxxxxx>; James.Bottomley@xxxxxxxxxxxxxxxxxxxxx <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>; martin.petersen@xxxxxxxxxx <martin.petersen@xxxxxxxxxx>
Cc: kevin.barnett@xxxxxxxx <kevin.barnett@xxxxxxxx>; thenzl@xxxxxxxxxx <thenzl@xxxxxxxxxx>; scott.teel@xxxxxxxx <scott.teel@xxxxxxxx>; hare@xxxxxxx <hare@xxxxxxx>; storagedev <storagedev@xxxxxxxxxxxxx>; linux-scsi@xxxxxxxxxxxxxxx <linux-scsi@xxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx <linux-kernel@xxxxxxxxxxxxxxx>; pengpeng@xxxxxxxxxxx <pengpeng@xxxxxxxxxxx>
Subject: [PATCH v2] scsi: hpsa: enlarge controller and IRQ name buffers
 


hpsa formats the controller name into h->devname[8] and derives
interrupt names from it in h->intrname[][16]. Once host_no reaches four
digits, "hpsa%d" no longer fits in devname, and the derived IRQ names
can then overrun the interrupt-name buffers as well.

The previous fix switched these builders to bounded formatting, but that
would truncate user-visible controller and IRQ names. Keep the existing
names intact instead by enlarging the fixed buffers to cover the current
formatted strings.

Fixes: 2946e82bdd76 ("hpsa: use scsi host_no as hpsa controller number")
Fixes: 8b47004a5512 ("hpsa: add interrupt number to /proc/interrupts interrupt name")
Acked-by: Don Brace <don.brace@xxxxxxxxxxxxx>
Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>

Thanks for your patch.

You already have my Acked-by tag...

---
v2:
- enlarge the fixed buffers instead of truncating the formatted names
- drop the mixed formatting-only changes

 drivers/scsi/hpsa.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index 99b0750850b2..bf33868a63d9 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -164,7 +164,7 @@ struct bmic_controller_parameters {
 struct ctlr_info {
        unsigned int *reply_map;
        int     ctlr;
-       char    devname[8];
+       char    devname[16];
        char    *product_name;
        struct pci_dev *pdev;
        u32     board_id;
@@ -255,7 +255,7 @@ struct ctlr_info {
        int remove_in_progress;
        /* Address of h->q[x] is passed to intr handler to know which queue */
        u8 q[MAX_REPLY_QUEUES];
-       char intrname[MAX_REPLY_QUEUES][16];    /* "hpsa0-msix00" names */
+       char intrname[MAX_REPLY_QUEUES][32];    /* controller and IRQ names */
        u32 TMFSupportFlags; /* cache what task mgmt funcs are supported. */
 #define HPSATMF_BITS_SUPPORTED  (1 << 0)
 #define HPSATMF_PHYS_LUN_RESET  (1 << 1)
--
2.50.1 (Apple Git-155)