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

    USB: garmin_gps: fix memory leak on disconnect

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

The filename of the patch is:
     usb-garmin_gps-fix-memory-leak-on-disconnect.patch
and it can be found in the queue-3.8 subdirectory.

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


>From 618aa1068df29c37a58045fe940f9106664153fd Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Tue, 19 Mar 2013 09:21:07 +0100
Subject: USB: garmin_gps: fix memory leak on disconnect

From: Johan Hovold <[email protected]>

commit 618aa1068df29c37a58045fe940f9106664153fd upstream.

Remove bogus disconnect test introduced by 95bef012e ("USB: more serial
drivers writing after disconnect") which prevented queued data from
being freed on disconnect.

The possible IO it was supposed to prevent is long gone.

Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/serial/garmin_gps.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -959,10 +959,7 @@ static void garmin_close(struct usb_seri
        if (!serial)
                return;
 
-       mutex_lock(&port->serial->disc_mutex);
-
-       if (!port->serial->disconnected)
-               garmin_clear(garmin_data_p);
+       garmin_clear(garmin_data_p);
 
        /* shutdown our urbs */
        usb_kill_urb(port->read_urb);
@@ -971,8 +968,6 @@ static void garmin_close(struct usb_seri
        /* keep reset state so we know that we must start a new session */
        if (garmin_data_p->state != STATE_RESET)
                garmin_data_p->state = STATE_DISCONNECTED;
-
-       mutex_unlock(&port->serial->disc_mutex);
 }
 
 


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

queue-3.8/usb-garmin_gps-fix-memory-leak-on-disconnect.patch
queue-3.8/usb-io_ti-fix-get_icount-for-two-port-adapters.patch
queue-3.8/usb-cdc-acm-fix-device-unregistration.patch
queue-3.8/usb-serial-fix-interface-refcounting.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to