Skip to contentSkip to conversation

hso modem detect fix patch against Alan Cox'es tty tree

PATCH1/1 Denis Joseph Barrow 2 participants 2 messages Dec 8, 2008 – Dec 9, 2008

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Here you go good sir,

Fixed incorrect check for the modem port, this prevents crashes caused by issueing a tiocmget_submit_urb on endpoints which don't exist for non modem devices.

---

drivers/net/usb/hso.c +1 -1
Index: linux-2.6.28-rc7.alan/drivers/net/usb/hso.c
===================================================================
@@ -2659,7 +2659,7 @@
 	serial->parent = hso_dev;
 	hso_dev->port_data.dev_serial = serial;
 
-	if (port & HSO_PORT_MODEM) {
+	if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
 		num_urbs = 2;
 		serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget),
 					   GFP_KERNEL);
Signature · 15 lines
best regards,
D.J. Barrow

Linux Kernel Developer
Option NV, Gaston Geenslaan 14, 3001 Leuven, Belgium
 
T: +32 16 311 621
F: +32 16 207 164
M: +32 4xx xxx xxx
[email protected]
www.option.com

Disclaimer:
http://www.option.com/company/disclaimer.shtml
 RPR Leuven 0429.375.448

Fixed incorrect check for the modem port, this prevents crashes caused by issueing a tiocmget_submit_urb on endpoints which don't exist for non modem devices.

---

drivers/net/usb/hso.c +1 -1
Index: linux-2.6.28-rc7.alan/drivers/net/usb/hso.c
===================================================================
@@ -2659,7 +2659,7 @@
 	serial->parent = hso_dev;
 	hso_dev->port_data.dev_serial = serial;
 
-	if (port & HSO_PORT_MODEM) {
+	if ((port & HSO_PORT_MASK) == HSO_PORT_MODEM) {
 		num_urbs = 2;
 		serial->tiocmget = kzalloc(sizeof(struct hso_tiocmget),
 					   GFP_KERNEL);
maintainer
#1 lore raw

From: Denis Joseph Barrow <[email protected]>
Date: Mon, 08 Dec 2008 15:38:31 +0100

Quoted 5 lines

Fixed incorrect check for the modem port, this prevents crashes caused by issueing a tiocmget_submit_urb on endpoints which don't exist for non modem devices.

Alan, you got this one or want me to grab it?

I'm fine either way.