From patchwork Fri Nov 4 05:41:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15366 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp192326wru; Thu, 3 Nov 2022 22:56:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6LXGACCptG7b48a5ei29AQ0CK2rg3fHZyhTJGPelCFkjilT8sniAUw162b2pPsONh1HMYS X-Received: by 2002:a17:906:dac9:b0:780:ab6f:591f with SMTP id xi9-20020a170906dac900b00780ab6f591fmr32861220ejb.77.1667541386455; Thu, 03 Nov 2022 22:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541386; cv=none; d=google.com; s=arc-20160816; b=c7ZzPA3FmYWwMaEbwRm9V2KTZ8XKvDblyYDQYJMqIRcb500yGfWH5tYSQ3ykhQ5S1N UT5WXmsSSyuqqJ9cZ6+C+b7RHlMcEK58rNwP3+WrKu++rRwk5NrY5SfV2AcgwDmsbb8k cMrVe6Fu/5Hj5exwq0SDv+nY0DkBhJSW0ZaS8CppyGB8umXD5EkybLxcsU/SeoNe5DHv mn1BJMsG0GitmdXFuGZEwxnrnnp1clrmQVHAYJ/X+YZA16eMQlqQAG0B9Fv8bqi3z9wl cC5UoyIEaaeroYmu7duQpvB0gydx0PaQ+uWEdbDd2mHOL6PkGIK8quzYHOiDvpDIAKXq k/jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=JJ9fxO0omKsekAH7yYD+vDpVhFhaomcxOn7O42ti/3o=; b=Pv0BYb9jnMDXpqCeKKv3tBjPOLxGLCCYa3cWL+Ds04LpKU2vQumsOBJkqzWmQIpxvB D7P2CLuDAJzmzq7S6D3VoSIFdVklBp3QgJNhq+sNW4W2qiuGQg/mHAgux1YDQ4cTw7IV Xr8zQN/gH6HleTgRxygY2YEY9UyMaO9H3jH4UUdpEm+/VVRFtkgcUdOkCVRTyFAQRzvR D8FCZLLr+7BVvdVkm7XVI6tAHB4+JkJpGit+UUqaXZUypjxirhKZRURBJ/3RpwGCPL1j Na0Sx5i6aq0Fg0QkqV5kJnlmflY2P2DDzaxJO0Oxwq31y0migtFi/yq+uFYNtwJAE1fs G6qQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a50d4c2000000b00461d02225a3si3491030edj.448.2022.11.03.22.56.03; Thu, 03 Nov 2022 22:56:26 -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 S231792AbiKDFu6 (ORCPT + 99 others); Fri, 4 Nov 2022 01:50:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231296AbiKDFsx (ORCPT ); Fri, 4 Nov 2022 01:48:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF49428714; Thu, 3 Nov 2022 22:48:50 -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 4D877620CE; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27F4BC43470; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZr-007191-2K; Fri, 04 Nov 2022 01:49:15 -0400 Message-ID: <20221104054915.557680781@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:13 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , 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: [RFC][PATCH v3 20/33] timers: usb: Use timer_shutdown_sync() before freeing timer References: <20221104054053.431922658@goodmis.org> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748543876881157829?= X-GMAIL-MSGID: =?utf-8?q?1748543876881157829?= From: "Steven Rostedt (Google)" Before a timer is freed, timer_shutdown_sync() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Johan Hovold Cc: Alan Stern Cc: Mathias Nyman Cc: Kai-Heng Feng Cc: Matthias Kaehlcke Cc: Michael Grzeschik Cc: Bhuvanesh Surachari Cc: Dan Carpenter Cc: linux-usb@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- drivers/usb/gadget/udc/m66592-udc.c | 2 +- drivers/usb/serial/garmin_gps.c | 2 +- drivers/usb/serial/mos7840.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index 931e6362a13d..c7e421b449f3 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c @@ -1519,7 +1519,7 @@ static int m66592_remove(struct platform_device *pdev) usb_del_gadget_udc(&m66592->gadget); - del_timer_sync(&m66592->timer); + timer_shutdown_sync(&m66592->timer); iounmap(m66592->reg); free_irq(platform_get_irq(pdev, 0), m66592); m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index f1a8d8343623..670e942fdaaa 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -1405,7 +1405,7 @@ static void garmin_port_remove(struct usb_serial_port *port) usb_kill_anchored_urbs(&garmin_data_p->write_urbs); usb_kill_urb(port->interrupt_in_urb); - del_timer_sync(&garmin_data_p->timer); + timer_shutdown_sync(&garmin_data_p->timer); kfree(garmin_data_p); } diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 6b12bb4648b8..8a2d902a1c12 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -1726,7 +1726,7 @@ static void mos7840_port_remove(struct usb_serial_port *port) mos7840_set_led_sync(port, MODEM_CONTROL_REGISTER, 0x0300); del_timer_sync(&mos7840_port->led_timer1); - del_timer_sync(&mos7840_port->led_timer2); + timer_shutdown_sync(&mos7840_port->led_timer2); usb_kill_urb(mos7840_port->led_urb); usb_free_urb(mos7840_port->led_urb);