Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1889838ybc; Sun, 24 Nov 2019 08:22:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyTfLuyJA6jW2ECyCG1MUbGAN9DP/Ki4b5XL3DiBGpUjtX5VVMU/Xt7OoqVGv6bd6ZqXUcs X-Received: by 2002:a50:c3c5:: with SMTP id i5mr13401013edf.137.1574612547805; Sun, 24 Nov 2019 08:22:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574612547; cv=none; d=google.com; s=arc-20160816; b=afy9h4EcMZm+DBAvbo8gn8A7lWK2AxyFgksug9oc4GWWmaPffOoexgsnwx4HXOBA2f g+I0P+5RmZqBW7HLh+LzRRj+3SnRTx5vFH+D+UnXklkhRJRhKGoTntsNInwu9r7mfzyb 9WiEztYb0VgSXynxBFAObhjPFo5EF6tYKcZUyFCSJjC+KK6aAtgdPVyaFKLAvrK1syZm JFL3HpFnTEiw6FRWzK7mIPMe7l/7rs9xQVRo/Fi6OIHF69AjfmXDVYdQ7ZuhRyg8R9w0 J83+Yvh6/LFFCH8hukOiIPdu6CBo+gLNJv7HyZH4P6GcjnlJ1hQCwtTByqHDm1ZNB1K8 SkdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=JYslJCvM8LcTtA0acacF3IohzldgoTUBcPm2hBmmevE=; b=vudFxStZtjcCSN9mrNfhKC05YXprmMTWWx1OGBuNrhzGDSSaRSQ+0dFyIdfFELvmje +oP0x1OdxA/h7PgXiUe9ahoKzehKm1mcNaFrvz52qSzTaScPf0unjh3aa8isFoZ6sgNP 0fNglujM8ej0lwIqNR6y5MqeoOJiAqTdL+oPTZjN0EMRREULtte02r8uYQ45nxUFrwNn 9ZVe+IDYITPlvM8caIJSHswYvam6pGO8ApZ3fwgBvyafTb3pm0QpG2QtFukwpBkV31oE iNEzNbg9TOhjkeptrboNYonAegLqqGnZ21Y2cZz6iLk9r0IztQohxPahe1z9e/uh9+XP kHwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s35si3099837edd.261.2019.11.24.08.21.51; Sun, 24 Nov 2019 08:22:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726833AbfKXQRi (ORCPT + 99 others); Sun, 24 Nov 2019 11:17:38 -0500 Received: from netrider.rowland.org ([192.131.102.5]:53673 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726784AbfKXQRh (ORCPT ); Sun, 24 Nov 2019 11:17:37 -0500 Received: (qmail 26958 invoked by uid 500); 24 Nov 2019 11:17:36 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 24 Nov 2019 11:17:36 -0500 Date: Sun, 24 Nov 2019 11:17:36 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: syzbot cc: andreyknvl@google.com, , , , , , Subject: Re: INFO: rcu detected stall in hub_event In-Reply-To: <0000000000004b60ec059809412f@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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]); + } } } }