* [GIT PULL] SCSI fixes for 7.3-rc3+
@ 2026-09-18 19:26 James Bottomley
2026-09-18 19:37 ` sashiko-bot
2026-09-18 21:10 ` pr-tracker-bot
0 siblings, 2 replies; 3+ messages in thread
From: James Bottomley @ 2026-09-18 19:26 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-scsi, linux-kernel
The following changes since commit af8c27375733fb6a6df9fa484cda77cc3dd0cb80:
scsi: megaraid_sas: Limit NVMe request size to the PRP chain frame (2026-09-02 12:13:15 -0400)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git/ tags/scsi-fixes
for you to fetch changes up to 3d676e458fe0c566f5a62753dc696b6a862fc412:
scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable() (2026-09-09 22:23:00 -0400)
----------------------------------------------------------------
Four driver fixes, three of which are minor and one of which (fnic)
tries to add some logic to try to avoid MSI-X being ineffective if
hyperthreading is disabled. The core fix adds validation to mode sense
buffer sizes because it is used by ATA and could, theoretically, be
exploited by a specially crafted USB device that can simply be plugged
in to any laptop or server.
----------------------------------------------------------------
Alberto Carboneri (1):
scsi: core: Validate MODE SENSE lengths in scsi_cdl_enable()
Arun Easi (1):
scsi: fnic: Fix missed link-up when critical IRQ targets offline CPU
Karl Mehltretter (2):
scsi: pm80xx: Fix the use_msix, use_tasklet and read_wwn parameter descriptions
scsi: qla2xxx: Fix the ql2xfc2target parameter description
Venkat Rao Bagalkote (1):
scsi: ibmvfc: Add Kconfig dependency to fix link failure when NVME_FC=m
drivers/scsi/Kconfig | 1 +
drivers/scsi/fnic/fnic.h | 2 +-
drivers/scsi/fnic/fnic_isr.c | 13 ++++++++++---
drivers/scsi/fnic/fnic_main.c | 41 ++++++++++++++++++++++++++++++++++++++-
drivers/scsi/pm8001/pm8001_init.c | 6 +++---
drivers/scsi/qla2xxx/qla_os.c | 2 +-
drivers/scsi/scsi.c | 24 ++++++++++++++++++-----
7 files changed, 75 insertions(+), 14 deletions(-)
---
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4a2af0f702e1..1eec66195cf4 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -753,6 +753,7 @@ config SCSI_IBMVFC
tristate "IBM Virtual FC support"
depends on PPC_PSERIES && SCSI
depends on SCSI_FC_ATTRS
+ depends on NVME_FC || NVME_FC=n
help
This is the IBM POWER Virtual FC Client
diff --git a/drivers/scsi/fnic/fnic.h b/drivers/scsi/fnic/fnic.h
index c576a7f5083e..3ba1592940ca 100644
--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -31,7 +31,7 @@
#define DRV_NAME "fnic"
#define DRV_DESCRIPTION "Cisco FCoE HBA Driver"
-#define DRV_VERSION "1.9.0.0"
+#define DRV_VERSION "1.9.0.1"
#define PFX DRV_NAME ": "
#define DFX DRV_NAME "%d: "
diff --git a/drivers/scsi/fnic/fnic_isr.c b/drivers/scsi/fnic/fnic_isr.c
index 02856745580f..43149d8312ec 100644
--- a/drivers/scsi/fnic/fnic_isr.c
+++ b/drivers/scsi/fnic/fnic_isr.c
@@ -245,7 +245,14 @@ int fnic_set_intr_mode_msix(struct fnic *fnic)
unsigned int m = ARRAY_SIZE(fnic->wq);
unsigned int o = ARRAY_SIZE(fnic->hw_copy_wq);
unsigned int min_irqs = n + m + 1 + 1; /*rq, raw wq, wq, err*/
-
+ /*
+ * Make driver critical vectors unmanaged, or else it can get tied
+ * to an offline CPU. This can happen when hyper-threading is off.
+ */
+ struct irq_affinity affd = {
+ .pre_vectors = n + m + 1, /* rq, raw wq, 1 ioq */
+ .post_vectors = 1, /* err */
+ };
/*
* We need n RQs, m WQs, o Copy WQs, n+m+o CQs, and n+m+o+1 INTRs
* (last INTR is used for WQ/RQ errors and notification area)
@@ -263,8 +270,8 @@ int fnic_set_intr_mode_msix(struct fnic *fnic)
int vec_count = 0;
int vecs = fnic->rq_count + fnic->raw_wq_count + fnic->wq_copy_count + 1;
- vec_count = pci_alloc_irq_vectors(fnic->pdev, min_irqs, vecs,
- PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
+ vec_count = pci_alloc_irq_vectors_affinity(fnic->pdev, min_irqs,
+ vecs, PCI_IRQ_MSIX|PCI_IRQ_AFFINITY, &affd);
FNIC_ISR_DBG(KERN_INFO, fnic,
"allocated %d MSI-X vectors\n",
vec_count);
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 9b3025007075..f13c381a66d7 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -744,8 +744,19 @@ static int fnic_nvme_drv_init(struct fnic *fnic)
return ret;
}
+static void fnic_mq_init_queue_map(struct fnic *fnic,
+ struct blk_mq_queue_map *qmap)
+{
+ unsigned int cpu;
+
+ for_each_possible_cpu(cpu)
+ qmap->mq_map[cpu] = 0;
+}
+
void fnic_mq_map_queues_cpus(struct Scsi_Host *host)
{
+ const struct cpumask *mask;
+ unsigned int queue, cpu;
struct fnic *fnic = *((struct fnic **) shost_priv(host));
struct pci_dev *l_pdev = fnic->pdev;
int intr_mode = fnic->config.intr_mode;
@@ -766,7 +777,35 @@ void fnic_mq_map_queues_cpus(struct Scsi_Host *host)
return;
}
- blk_mq_map_hw_queues(qmap, &l_pdev->dev, FNIC_PCI_OFFSET);
+ fnic_mq_init_queue_map(fnic, qmap);
+
+ /*
+ * Setup CPU to Queue mapping for all managed MSI-X IRQs.
+ * Q0 is driver critical and non-managed, hence start from Q1.
+ */
+ for (queue = 1; queue < qmap->nr_queues; queue++) {
+ int irq_num = pci_irq_vector(fnic->pdev,
+ queue + FNIC_PCI_OFFSET);
+
+ if (irq_num < 0)
+ continue;
+
+ mask = pci_irq_get_affinity(fnic->pdev,
+ queue + FNIC_PCI_OFFSET);
+ if (!mask) {
+ shost_printk(KERN_ERR, host,
+ "failed to get irq_affinity map for queue:%d\n", irq_num);
+ continue;
+ }
+ FNIC_MAIN_DBG(KERN_INFO, fnic,
+ "got irq_affinity map for %d:\n", irq_num);
+ for_each_cpu(cpu, mask) {
+ qmap->mq_map[cpu] = qmap->queue_offset + queue;
+ FNIC_MAIN_DBG(KERN_INFO, fnic,
+ "[Q%d] cpu:%d <=> irq:%d\n",
+ queue, cpu, irq_num);
+ }
+ }
}
static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 54b35893261a..5af81c73a8f8 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -58,15 +58,15 @@ MODULE_PARM_DESC(link_rate, "Enable link rate.\n"
bool pm8001_use_msix = true;
module_param_named(use_msix, pm8001_use_msix, bool, 0444);
-MODULE_PARM_DESC(zoned, "Use MSIX interrupts. Default: true");
+MODULE_PARM_DESC(use_msix, "Use MSIX interrupts. Default: true");
static bool pm8001_use_tasklet = true;
module_param_named(use_tasklet, pm8001_use_tasklet, bool, 0444);
-MODULE_PARM_DESC(zoned, "Use MSIX interrupts. Default: true");
+MODULE_PARM_DESC(use_tasklet, "Use tasklets for interrupt handling. Default: true");
static bool pm8001_read_wwn = true;
module_param_named(read_wwn, pm8001_read_wwn, bool, 0444);
-MODULE_PARM_DESC(zoned, "Get WWN from the controller. Default: true");
+MODULE_PARM_DESC(read_wwn, "Get WWN from the controller. Default: true");
uint pcs_event_log_severity = 0x03;
module_param(pcs_event_log_severity, int, 0644);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index c0efdbff5da7..3c412c7fb6fe 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -352,7 +352,7 @@ MODULE_PARM_DESC(ql2xnvme_queues,
int ql2xfc2target = 1;
module_param(ql2xfc2target, int, 0444);
-MODULE_PARM_DESC(qla2xfc2target,
+MODULE_PARM_DESC(ql2xfc2target,
"Enables FC2 Target support. "
"0 - FC2 Target support is disabled. "
"1 - FC2 Target support is enabled (default).");
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 76cdad063f7b..f285521d9de6 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -727,6 +727,7 @@ int scsi_cdl_enable(struct scsi_device *sdev, bool enable)
struct scsi_mode_data data;
struct scsi_sense_hdr sshdr;
char *buf_data;
+ size_t avail, offset;
int len;
ret = scsi_mode_sense(sdev, 0x08, 0x0a, 0xf2, buf, sizeof(buf),
@@ -735,11 +736,24 @@ int scsi_cdl_enable(struct scsi_device *sdev, bool enable)
return -EINVAL;
/* Enable or disable CDL using the ATA feature page */
- len = min_t(size_t, sizeof(buf),
- data.length - data.header_length -
- data.block_descriptor_length);
- buf_data = buf + data.header_length +
- data.block_descriptor_length;
+ avail = min_t(size_t, data.length, sizeof(buf));
+ if (data.header_length > avail)
+ return -EINVAL;
+
+ offset = data.header_length;
+ avail -= data.header_length;
+
+ if (data.block_descriptor_length > avail)
+ return -EINVAL;
+
+ offset += data.block_descriptor_length;
+ avail -= data.block_descriptor_length;
+
+ if (avail < 5)
+ return -EINVAL;
+
+ buf_data = buf + offset;
+ len = avail;
/*
* If we want to enable CDL and CDL is already enabled on the
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [GIT PULL] SCSI fixes for 7.3-rc3+
2026-09-18 19:26 [GIT PULL] SCSI fixes for 7.3-rc3+ James Bottomley
@ 2026-09-18 19:37 ` sashiko-bot
2026-09-18 21:10 ` pr-tracker-bot
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-18 19:37 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] block: hardcoded index 0 ignores queue_offset in fnic_mq_init_queue_map()
--
commit fb10ad8a27ba0b6671190a2c5e8966d7c784afce
Author: James Bottomley <James.Bottomley@HansenPartnership.com>
SCSI fixes for 7.3-rc3+
This commit pulls in four driver fixes and one core fix. It includes a fix in
the fnic driver to add logic avoiding ineffective MSI-X when hyperthreading is
disabled, as well as a core fix validating mode sense buffer sizes.
> diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
> index 9b3025007075e..f13c381a66d7f 100644
> --- a/drivers/scsi/fnic/fnic_main.c
> +++ b/drivers/scsi/fnic/fnic_main.c
> @@ -744,8 +744,19 @@ static int fnic_nvme_drv_init(struct fnic *fnic)
> return ret;
> }
>
> +static void fnic_mq_init_queue_map(struct fnic *fnic,
> + struct blk_mq_queue_map *qmap)
> +{
> + unsigned int cpu;
> +
> + for_each_possible_cpu(cpu)
> + qmap->mq_map[cpu] = 0;
[Severity: Low]
Does this hardcoded index 0 in fnic_mq_init_queue_map() ignore the
queue_offset field provided by the block layer?
If multiple queue maps (like READ/POLL) were ever used, hardcoding 0 instead
of using qmap->queue_offset would violate the block layer API for hardware
queue mapping, routing unassigned CPUs to the tagset's absolute 0th queue
instead of the 0th queue of the correct map.
Because the fnic driver currently sets up only a single default tagset map
(HCTX_TYPE_DEFAULT) where queue_offset is always 0, this doesn't trigger
a functional bug today. But should this be updated to use qmap->queue_offset
for API correctness and future-proofing?
> +}
> +
> void fnic_mq_map_queues_cpus(struct Scsi_Host *host)
> {
--
Sashiko AI review · https://sashiko.dev/#/patchset/71da251528b9af2948fb5a4c8bcd045e65b3e42e.camel@HansenPartnership.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [GIT PULL] SCSI fixes for 7.3-rc3+
2026-09-18 19:26 [GIT PULL] SCSI fixes for 7.3-rc3+ James Bottomley
2026-09-18 19:37 ` sashiko-bot
@ 2026-09-18 21:10 ` pr-tracker-bot
1 sibling, 0 replies; 3+ messages in thread
From: pr-tracker-bot @ 2026-09-18 21:10 UTC (permalink / raw)
To: James Bottomley; +Cc: Andrew Morton, Linus Torvalds, linux-scsi, linux-kernel
The pull request you sent on Fri, 18 Sep 2026 15:26:23 -0400:
> https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git/ tags/scsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/925724c0816e327b6d3a47388cec1203d108ebe7
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-18 21:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-18 19:26 [GIT PULL] SCSI fixes for 7.3-rc3+ James Bottomley
2026-09-18 19:37 ` sashiko-bot
2026-09-18 21:10 ` pr-tracker-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.