lkml.org 
[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 39/44] Fix an endless loop in hid-core.c if device has empty reports
Date
From
You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================

ChangeSet@1.1608.78.13, 2004-03-10 09:02:48+01:00, davidm@hpl.hp.com
input: Avoid an endless loop in hid-core.c, if a device has some
empty reports.


hid-input.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)

===================================================================

diff -Nru a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
--- a/drivers/usb/input/hid-input.c Tue Mar 16 13:17:41 2004
+++ b/drivers/usb/input/hid-input.c Tue Mar 16 13:17:41 2004
@@ -569,8 +569,10 @@
while (list != &report_enum->report_list) {
report = (struct hid_report *) list;

- if (!report->maxfield)
+ if (!report->maxfield) {
+ list = list->next;
continue;
+ }

if (!hidinput) {
hidinput = kmalloc(sizeof(*hidinput), GFP_KERNEL);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:1.203 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site