summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2010-03-22 15:50:14 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-23 00:18:22 +0200
commita23b64845f1ed0c090e30a70ca747a379674e006 (patch)
tree603bf71c16284622eb6e53cb51cb996fa5ab7b6b
parentUSB: ehci: omap: fix kernel panic with rmmod (diff)
downloadlinux-a23b64845f1ed0c090e30a70ca747a379674e006.tar.xz
linux-a23b64845f1ed0c090e30a70ca747a379674e006.zip
usb: wusb: don't overflow the Keep Alive IE buffer
The Keep Alive IE only has space for WUIE_ELT_MAX (== 4) device addresses. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/wusbcore/devconnect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index 46e79d349498..7ec24e46b34b 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -438,7 +438,7 @@ static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
old_keep_alives = ie->hdr.bLength - sizeof(ie->hdr);
keep_alives = 0;
for (cnt = 0;
- keep_alives <= WUIE_ELT_MAX && cnt < wusbhc->ports_max;
+ keep_alives < WUIE_ELT_MAX && cnt < wusbhc->ports_max;
cnt++) {
unsigned tt = msecs_to_jiffies(wusbhc->trust_timeout);