[lkml]   [2006]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] [qla2xxx] only free_irq() after request_irq() succeeds
    [qla2xxx] only free_irq() after request_irq() succeeds

    If qla2x00_probe_one() fails before calling request_irq() but gets to
    qla2x00_free_device() then it will mistakenly tree to free an irq it didn't
    request. It's chosing to free based on ha->pdev->irq which is always set.

    host->irq is set after request_irq() succeeds so let's use that to decide
    to free or not.

    This was observed and tested when a silly set of circumstances lead to firmware
    loading failing on a 2100.

    Signed-off-by: Zach Brown <>

    drivers/scsi/qla2xxx/qla_os.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    Index: 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
    --- 2.6.17-rc1-mm2-qlafreeirq.orig/drivers/scsi/qla2xxx/qla_os.c
    +++ 2.6.17-rc1-mm2-qlafreeirq/drivers/scsi/qla2xxx/qla_os.c
    @@ -1700,8 +1700,8 @@ qla2x00_free_device(scsi_qla_host_t *ha)
    ha-> = 0;

    /* Detach interrupts */
    - if (ha->pdev->irq)
    - free_irq(ha->pdev->irq, ha);
    + if (ha->host->irq)
    + free_irq(ha->host->irq, ha);

    /* release io space registers */
    if (ha->iobase)
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2006-04-11 01:42    [W:0.017 / U:0.520 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site