Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2164300rwi; Fri, 28 Oct 2022 03:59:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5u7JapkGdIfZXbMLz68aY7HP8f0iU1XBjD8Rv9Sz0xvmVnk895qqpOeX7TFspWrDtt5xns X-Received: by 2002:a05:6402:17d9:b0:461:7c3c:926e with SMTP id s25-20020a05640217d900b004617c3c926emr31001026edy.200.1666954754175; Fri, 28 Oct 2022 03:59:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666954754; cv=none; d=google.com; s=arc-20160816; b=Rex2c1+cEUlKS0qbvzvTfSpsQFJJa41sIf/+VrYW4b4Kr/F5HbB1FEVhq5m4QHA58A 0DIE3vFoIIgZBX3dRNnV80HHSf4zzSxKY1rUtMw7WeuUWxjGaXBcmozdFI5cpX1K2RYb fgoT/AJ1935auhfS/M/kPLh4Mta+47KT5KNAP6KkYTmf+QVp6IF+y40HvzuUTrga6iAZ V/eutvTx/Hc2wVYkwxg3JE/ntfiO1/HlXLmrewaQqAW7B0c9gPlZKgCsf/+K+4aI701q oGQ8CFSr6yQLs7fby8XTXmWHm4cJzxrmgW4b2f4XwVPLMwoEfLgAL1qQN2f7IAGYeQEx qXgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=r3GjyJ9dzsP93nm2bBSUhrVE68YSS6d9xtAlYc2/Y8Y=; b=aZSdXA8A8JSVqHb0AUAzakVGI87Gm3+yvu7W8wuzJmJfkED+y90F1mNhW0nv7D+Wpl PpyOZypm+8LQD8KNlqti3xAtcSIpkIjAB6QcNFcr38o+5a8aeAGnlhQIf/iZWWW2KfJs gKMGnhnCdfHszPgT09ulMJJFFlx13IFlkJMgSkStFbu+V4qVdIEPKRBJFqBcNi5d3Sbz p+7sHNQOYojxGCHIl9L0rJJe6NUwzMa5OwdiFs09NWPKopMOR7BjAI7MhzTqjDUtuNkj c2T8/1AnLtBOpwgMvpc1NeePLcGuEV0T0eTYt6pRmyJd78/rgNPxf8b8sYk4R+YuBLUy Q0fA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt27-20020a170906aadb00b00780af308970si338900ejb.185.2022.10.28.03.58.48; Fri, 28 Oct 2022 03:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbiJ1KOL (ORCPT + 99 others); Fri, 28 Oct 2022 06:14:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbiJ1KOK (ORCPT ); Fri, 28 Oct 2022 06:14:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21001B90F1; Fri, 28 Oct 2022 03:14:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1C5F4626E1; Fri, 28 Oct 2022 10:14:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B70A7C433C1; Fri, 28 Oct 2022 10:14:06 +0000 (UTC) Date: Fri, 28 Oct 2022 06:14:22 -0400 From: Steven Rostedt To: Guenter Roeck Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Thomas Gleixner , Stephen Boyd , Greg Kroah-Hartman , Felipe Balbi , Johan Hovold , Alan Stern , Mathias Nyman , Kai-Heng Feng , Matthias Kaehlcke , Michael Grzeschik , Bhuvanesh Surachari , Dan Carpenter , linux-usb@vger.kernel.org Subject: Re: [RFC][PATCH v2 20/31] timers: usb: Use del_timer_shutdown() before freeing timer Message-ID: <20221028061422.139c54a7@gandalf.local.home> In-Reply-To: <4e61935b-b06b-1f2d-6c2b-79bdfd569cd6@roeck-us.net> References: <20221027150525.753064657@goodmis.org> <20221027150928.983388020@goodmis.org> <4e61935b-b06b-1f2d-6c2b-79bdfd569cd6@roeck-us.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Oct 2022 22:23:06 -0700 Guenter Roeck wrote: > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > > index bbab424b0d55..397f263ab7da 100644 > > --- a/drivers/usb/core/hub.c > > +++ b/drivers/usb/core/hub.c > > @@ -1261,6 +1261,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) > > > > /* Don't do a long sleep inside a workqueue routine */ > > if (type == HUB_INIT2) { > > + /* Timers must be shutdown before they are re-initialized */ > > + if (hub->init_work.work.func) > > + del_timer_shutdown(&hub->init_work.timer); > > INIT_DELAYED_WORK(&hub->init_work, hub_init_func3); > > A similar call to INIT_DELAYED_WORK() around line 1085 needs the same change. > > It would be great if that can somehow be hidden in INIT_DELAYED_WORK(). I agree, but the delayed work is such a special case, I'm struggling to find something that works sensibly. :-/ -- Steve