This is a note to let you know that I've just added the patch titled

    [SCSI] fix memory leak in scsi_report_lun_scan

to the 2.6.33-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.33.git;a=summary

The filename of the patch is:
     fix-memory-leak-in-scsi_report_lun_scan.patch
and it can be found in the queue-2.6.33 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.33 longterm 
tree,
please let <[email protected]> know about it.


>From 75f8ee8e01a6c96652f27da40d4bdac9e2e485f0 Mon Sep 17 00:00:00 2001
From: Alan Stern <[email protected]>
Date: Fri, 12 Feb 2010 12:13:31 -0500
Subject: [SCSI] fix memory leak in scsi_report_lun_scan

From: Alan Stern <[email protected]>

commit 75f8ee8e01a6c96652f27da40d4bdac9e2e485f0 upstream.

This patch (as1333) fixes a bug in scsi_report_lun_scan().  If a
newly-allocated device can't be used, it should be deleted.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/scsi/scsi_scan.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1339,8 +1339,10 @@ static int scsi_report_lun_scan(struct s
                sdev = scsi_alloc_sdev(starget, 0, NULL);
                if (!sdev)
                        return 0;
-               if (scsi_device_get(sdev))
+               if (scsi_device_get(sdev)) {
+                       __scsi_remove_device(sdev);
                        return 0;
+               }
        }
 
        sprintf(devname, "host %d channel %d id %d",


Patches currently in longterm-queue-2.6.33 which might be from 
[email protected] are

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to