From: Greg KH <greg@kroah.com>
To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More USB fixes for 2.5.67
Date: Wed, 16 Apr 2003 23:05:05 -0700 [thread overview]
Message-ID: <1050559505328@kroah.com> (raw)
In-Reply-To: <10505595052196@kroah.com>
ChangeSet 1.1065, 2003/04/14 10:31:35-07:00, baldrick@wanadoo.fr
[PATCH] USB speedtouch: discard packets for non-existant vcc's
I broke part of the udsl_decode_rawcell logic in a previous patch, leading to
possible hangs on startup/shutdown. I've attached the 2.4 and 2.5 versions.
Thanks to Subodh Srivastava and Ted Phelps for their bug reports. Here is the
2.5 patch included inline for reference:
diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c
--- a/drivers/usb/misc/speedtch.c Wed Apr 16 10:48:36 2003
+++ b/drivers/usb/misc/speedtch.c Wed Apr 16 10:48:36 2003
@@ -278,9 +278,10 @@
/* here should the header CRC check be... */
- if (!(vcc = udsl_find_vcc (instance, vpi, vci)))
+ if (!(vcc = udsl_find_vcc (instance, vpi, vci))) {
dbg ("udsl_decode_rawcell: no vcc found for packet on vpi %d, vci %d", vpi, vci);
- else {
+ __skb_pull (skb, min (skb->len, (unsigned) 53));
+ } else {
dbg ("udsl_decode_rawcell found vcc %p for packet on vpi %d, vci %d", vcc, vpi, vci);
if (skb->len >= 53) {
@@ -323,8 +324,8 @@
skb_pull (skb, 53);
} else {
/* If data is corrupt and skb doesn't hold a whole cell, flush the lot */
- if (skb_pull (skb, 53) == NULL)
- return NULL;
+ __skb_pull (skb, skb->len);
+ return NULL;
}
}
}
next prev parent reply other threads:[~2003-04-17 5:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-17 6:03 [BK PATCH] More USB fixes for 2.5.67 Greg KH
2003-04-17 6:05 ` [PATCH] " Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH [this message]
2003-04-17 6:05 ` Greg KH
2003-04-17 6:05 ` Greg KH
2003-04-17 15:18 ` Matthew Dharm
2003-04-17 17:10 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1050559505328@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).