Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bf2a1928f3e5d44934e974940a8260a57fcc8a58
Commit:     bf2a1928f3e5d44934e974940a8260a57fcc8a58
Parent:     3cd041fb7f50f4cee3bc3a2b0ce02b1562894894
Author:     Darrick J. Wong <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 11 14:15:26 2007 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Sat Jan 13 16:19:07 2007 -0600

    [SCSI] aic94xx: Match request_firmware with release_firmware
    
    The vmalloc() blob holding the sequencer firmware wasn't being released at
    module unload time, which resulted in a memory leak.
    
    Signed-off-by: Alexis Bruemmer <[EMAIL PROTECTED]>
    Acked-by: Darrick J. Wong <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/aic94xx/aic94xx_init.c |    1 +
 drivers/scsi/aic94xx/aic94xx_seq.c  |    7 +++++++
 drivers/scsi/aic94xx/aic94xx_seq.h  |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/aic94xx/aic94xx_init.c 
b/drivers/scsi/aic94xx/aic94xx_init.c
index 9a9ea74..6faa10f 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -886,6 +886,7 @@ static void __exit aic94xx_exit(void)
        asd_remove_driver_attrs(&aic94xx_pci_driver.driver);
        pci_unregister_driver(&aic94xx_pci_driver);
        sas_release_transport(aic94xx_transport_template);
+       asd_release_firmware();
        asd_destroy_global_caches();
        asd_printk("%s version %s unloaded\n", ASD_DRIVER_DESCRIPTION,
                   ASD_DRIVER_VERSION);
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.c 
b/drivers/scsi/aic94xx/aic94xx_seq.c
index 8451125..21569ec 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.c
+++ b/drivers/scsi/aic94xx/aic94xx_seq.c
@@ -1232,6 +1232,13 @@ static int asd_seq_start_lseq(struct asd_ha_struct 
*asd_ha, int lseq)
        return asd_seq_unpause_lseq(asd_ha, lseq);
 }
 
+int asd_release_firmware(void)
+{
+       if (sequencer_fw)
+               release_firmware(sequencer_fw);
+       return 0;
+}
+
 static int asd_request_firmware(struct asd_ha_struct *asd_ha)
 {
        int err, i;
diff --git a/drivers/scsi/aic94xx/aic94xx_seq.h 
b/drivers/scsi/aic94xx/aic94xx_seq.h
index 9e715e5..9437ff0 100644
--- a/drivers/scsi/aic94xx/aic94xx_seq.h
+++ b/drivers/scsi/aic94xx/aic94xx_seq.h
@@ -63,6 +63,7 @@ int asd_pause_lseq(struct asd_ha_struct *asd_ha, u8 
lseq_mask);
 int asd_unpause_lseq(struct asd_ha_struct *asd_ha, u8 lseq_mask);
 int asd_init_seqs(struct asd_ha_struct *asd_ha);
 int asd_start_seqs(struct asd_ha_struct *asd_ha);
+int asd_release_firmware(void);
 
 void asd_update_port_links(struct asd_ha_struct *asd_ha, struct asd_phy *phy);
 #endif
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to