[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110330210803.3CE3C3E1A05@tassilo.jf.intel.com>
Date: Wed, 30 Mar 2011 14:08:03 -0700 (PDT)
From: Andi Kleen <andi@...stfloor.org>
To: jhovold@...il.com, gregkh@...e.de, ak@...ux.intel.com,
linux-kernel@...r.kernel.org, stable@...nel.org,
tim.bird@...sony.com
Subject: [PATCH] [237/275] USB: cdc-acm: fix potential null-pointer dereference
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <jhovold@...il.com>
commit 15e5bee33ffc11d0e5c6f819a65e7881c5c407be upstream.
Must check return value of tty_port_tty_get.
Signed-off-by: Johan Hovold <jhovold@...il.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
drivers/usb/class/cdc-acm.c | 2 ++
1 file changed, 2 insertions(+)
Index: linux-2.6.35.y/drivers/usb/class/cdc-acm.c
===================================================================
--- linux-2.6.35.y.orig/drivers/usb/class/cdc-acm.c 2011-03-29 23:03:03.135219948 -0700
+++ linux-2.6.35.y/drivers/usb/class/cdc-acm.c 2011-03-29 23:53:54.272148988 -0700
@@ -533,6 +533,8 @@
if (!ACM_READY(acm))
return;
tty = tty_port_tty_get(&acm->port);
+ if (!tty)
+ return;
tty_wakeup(tty);
tty_kref_put(tty);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists