From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1239C432C0 for ; Mon, 25 Nov 2019 21:24:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0F312071A for ; Mon, 25 Nov 2019 21:24:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725924AbfKYVYG (ORCPT ); Mon, 25 Nov 2019 16:24:06 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:58250 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725912AbfKYVYG (ORCPT ); Mon, 25 Nov 2019 16:24:06 -0500 Received: (qmail 5654 invoked by uid 2102); 25 Nov 2019 16:24:05 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 25 Nov 2019 16:24:05 -0500 Date: Mon, 25 Nov 2019 16:24:05 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: syzbot cc: andreyknvl@google.com, , , , , , Subject: Re: INFO: rcu detected stall in hub_event In-Reply-To: <00000000000003b7c305982885e3@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org #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 @@ -1057,6 +1057,8 @@ static void hid_apply_multiplier(struct while (multiplier_collection->parent_idx != -1 && multiplier_collection->type != HID_COLLECTION_LOGICAL) multiplier_collection = &hid->collection[multiplier_collection->parent_idx]; + if (multiplier_collection->type != HID_COLLECTION_LOGICAL) + multiplier_collection = NULL; effective_multiplier = hid_calculate_multiplier(hid, multiplier); @@ -1191,6 +1193,9 @@ int hid_open_report(struct hid_device *d } device->collection_size = HID_DEFAULT_NUM_COLLECTIONS; + /* Needed for usages before the first collection */ + device->collection[0].parent_idx = -1; + ret = -EINVAL; while ((start = fetch_item(start, end, &item)) != NULL) {