]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: dpt_i2o: Do not process completions with invalid addresses
authorBen Hutchings <benh@debian.org>
Sat, 27 May 2023 13:52:48 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:29:04 +0000 (10:29 +0200)
adpt_isr() reads reply addresses from a hardware register, which
should always be within the DMA address range of the device's pool of
reply address buffers.  In case the address is out of range, it tries
to muddle on, converting to a virtual address using bus_to_virt().

bus_to_virt() does not take DMA addresses, and it doesn't make sense
to try to handle the completion in this case.  Ignore it and continue
looping to service the interrupt.  If a completion has been lost then
the SCSI core should eventually time-out and trigger a reset.

There is no corresponding upstream commit, because this driver was
removed upstream.

Fixes: 67af2b060e02 ("[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt ...")
Signed-off-by: Ben Hutchings <benh@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/Kconfig
drivers/scsi/dpt_i2o.c

index 9ea30fcb44282adc48e1c7ae2bcb5053921a99cf..51bbc858a944caaa2d0e37a8bd3db9dc7cea2855 100644 (file)
@@ -443,7 +443,7 @@ config SCSI_MVUMI
 
 config SCSI_DPT_I2O
        tristate "Adaptec I2O RAID support "
-       depends on SCSI && PCI && VIRT_TO_BUS
+       depends on SCSI && PCI
        help
          This driver supports all of Adaptec's I2O based RAID controllers as 
          well as the DPT SmartRaid V cards.  This is an Adaptec maintained
index 30b24e0151808e75654206b2daacc25d7c701f57..912acd2b5067c9caf98dae412ec690365506a510 100644 (file)
@@ -56,7 +56,7 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");
 
 #include <asm/processor.h>     /* for boot_cpu_data */
 #include <asm/pgtable.h>
-#include <asm/io.h>            /* for virt_to_bus, etc. */
+#include <asm/io.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -1869,7 +1869,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id)
                } else {
                        /* Ick, we should *never* be here */
                        printk(KERN_ERR "dpti: reply frame not from pool\n");
-                       reply = (u8 *)bus_to_virt(m);
+                       continue;
                }
 
                if (readl(reply) & MSG_FAIL) {