lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [237/275] USB: cdc-acm: fix potential null-pointer dereference
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Johan Hovold <jhovold@gmail.com>

commit 15e5bee33ffc11d0e5c6f819a65e7881c5c407be upstream.

Must check return value of tty_port_tty_get.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.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);
}

\
 
 \ /
  Last update: 2011-03-30 23:21    [W:1.143 / U:0.372 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site