From: Alan Stern <stern@rowland.harvard.edu>
To: syzbot <syzbot+ec5f884c4a135aa0dbb9@syzkaller.appspotmail.com>
Cc: andreyknvl@google.com, <benjamin.tissoires@redhat.com>,
<jikos@kernel.org>, <linux-input@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
<syzkaller-bugs@googlegroups.com>
Subject: Re: INFO: rcu detected stall in hub_event
Date: Sun, 24 Nov 2019 11:17:36 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1911241115410.26037-100000@netrider.rowland.org> (raw)
In-Reply-To: <0000000000004b60ec059809412f@google.com>
Another diagnostic patch.
Alan Stern
#syz test: https://github.com/google/kasan.git 46178223
Index: usb-devel/drivers/hid/hid-core.c
===================================================================
--- usb-devel.orig/drivers/hid/hid-core.c
+++ usb-devel/drivers/hid/hid-core.c
@@ -175,7 +175,8 @@ static int open_collection(struct hid_pa
collection->level = parser->collection_stack_ptr - 1;
collection->parent_idx = (collection->level == 0) ? -1 :
parser->collection_stack[collection->level - 1];
-
+ hid_info(parser->device, "New collection %px: idx %d parent %d type %d\n",
+ collection, (int) collection_index, collection->parent_idx, type);
if (type == HID_COLLECTION_APPLICATION)
parser->device->maxapplication++;
@@ -1046,8 +1047,18 @@ static void hid_apply_multiplier(struct
*/
multiplier_collection = &hid->collection[multiplier->usage->collection_index];
while (multiplier_collection->parent_idx != -1 &&
- multiplier_collection->type != HID_COLLECTION_LOGICAL)
+ multiplier_collection->type != HID_COLLECTION_LOGICAL) {
+ hid_info(hid, "collection %d %px type %d parent %d\n",
+ (int) (multiplier_collection - hid->collection), multiplier_collection,
+ multiplier_collection->type, multiplier_collection->parent_idx);
+ if (multiplier_collection->parent_idx >=
+ multiplier_collection - hid->collection) {
+ hid_info(hid, "BUG: found invalid parent_idx\n");
+ return;
+ }
multiplier_collection = &hid->collection[multiplier_collection->parent_idx];
+ }
+ hid_info(hid, "Got collection\n");
effective_multiplier = hid_calculate_multiplier(hid, multiplier);
@@ -1060,6 +1071,7 @@ static void hid_apply_multiplier(struct
effective_multiplier);
}
}
+ hid_info(hid, "Applied multiplier\n");
}
/*
@@ -1094,16 +1106,23 @@ void hid_setup_resolution_multiplier(str
rep_enum = &hid->report_enum[HID_FEATURE_REPORT];
list_for_each_entry(rep, &rep_enum->report_list, list) {
+ hid_info(hid, "Start report %px maxfield %d\n",
+ rep, rep->maxfield);
for (i = 0; i < rep->maxfield; i++) {
/* Ignore if report count is out of bounds. */
if (rep->field[i]->report_count < 1)
continue;
+ hid_info(hid, "Field %d %px maxusage %d\n",
+ i, rep->field[i], rep->field[i]->maxusage);
for (j = 0; j < rep->field[i]->maxusage; j++) {
usage = &rep->field[i]->usage[j];
- if (usage->hid == HID_GD_RESOLUTION_MULTIPLIER)
+ if (usage->hid == HID_GD_RESOLUTION_MULTIPLIER) {
+ hid_info(hid, "Usage %d %px\n",
+ j, usage);
hid_apply_multiplier(hid,
rep->field[i]);
+ }
}
}
}
next prev parent reply other threads:[~2019-11-24 16:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 14:45 INFO: rcu detected stall in hub_event syzbot
2019-11-22 16:51 ` Alan Stern
2019-11-22 21:31 ` Andrey Konovalov
2019-11-25 17:30 ` Alan Stern
2019-12-09 18:26 ` Alan Stern
2019-12-10 21:26 ` [PATCH] HID: Fix slab-out-of-bounds read in hid_field_extract Alan Stern
2019-12-11 14:18 ` Jiri Kosina
2019-12-11 15:10 ` Alan Stern
2019-12-13 8:44 ` Jiri Kosina
2024-04-08 16:55 ` INFO: rcu detected stall in hub_event Alan Stern
2019-11-23 20:20 ` syzbot
2019-11-24 16:17 ` Alan Stern [this message]
2019-11-25 9:38 ` syzbot
2019-11-25 21:24 ` Alan Stern
2019-11-26 7:48 ` Jiri Kosina
2019-11-26 15:18 ` Alan Stern
2019-11-26 20:21 ` syzbot
2022-07-30 10:27 ` [syzbot] " syzbot
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=Pine.LNX.4.44L0.1911241115410.26037-100000@netrider.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=andreyknvl@google.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=syzbot+ec5f884c4a135aa0dbb9@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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).