Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp1954134rwj; Sun, 30 Oct 2022 08:56:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sA3IlXf9tkUhHnPIkUI6m5Qe/eKd/PTBfFnCgn5/uz+Omk7SBwqzLNHyHEbGM8i/Dibe/ X-Received: by 2002:aa7:da0a:0:b0:461:135e:7298 with SMTP id r10-20020aa7da0a000000b00461135e7298mr9255082eds.242.1667145419047; Sun, 30 Oct 2022 08:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667145419; cv=none; d=google.com; s=arc-20160816; b=fcGUgqN+bIXi+C/WPMkMxfiu4dg9k3nl8g8Ck/EKqOCDfDprQnoUuwfYBWBsBPtcVM GUq3COaKdDLHFYqus3PTZpuCcrNBR5Sz9QCy1XX9zLTUyFnZ2D0Un0v3xmG6qKBUYKGT VxZmPGRY6kghwi3uIG10wTsNeJLxKjRgd2BzuLGNOLOi0st6h6WlXM56+JCcnM7D4Mbg KZN6JmfJ7mfwtFtWG9aMRR0HTMsLC6y4vnr+po65Rpx7MLTP4u44RU7v6maiJiWPGqeE M1X8z6fIhTeRigjRFSJolF3wI61zveWihvqrf4hO3NYt/vpmGjimWoh00tNCiFYXzKVr SbMA== 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=ugiY4lilQuEM9/aSysgp/U81+cpNLAlbAY2qIdsEdmQ=; b=p3eiQpK+UvNTod9XmyfdMNaVxk1R24EaMXwLup7dExy6wjz3XjuA/YDsqhvWfWvdS1 OJ4uyfXrcDMA13N24JF2aurg2VmCEQp/A7ukSZ1WHEViu1HDnsX7c8e/oFzC/I7Lqpoj Z5oNwQfz788E5njbfMF24TOGLoiZyRgCdiAMk7UDzlTT77KwQlOu5LWXskX2V8hR6Y6x EChsTx4IrlHL2rQw+xDY63S52E5Gei5YyHcYa0eu9MKCesR8Ru4YLZ1/+i5gOB95NKsz wIhHWZs+lSCofmYUAgv+jQELDKEwFz7tU9fp0ADjeITbgrLZ94+qL3bDJ8T8bWhJp6Jb gowQ== 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 k15-20020a1709061c0f00b006feb76dbd51si3898075ejg.289.2022.10.30.08.56.33; Sun, 30 Oct 2022 08:56:59 -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 S229853AbiJ3PsU (ORCPT + 99 others); Sun, 30 Oct 2022 11:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiJ3PsR (ORCPT ); Sun, 30 Oct 2022 11:48:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88E22B1FC; Sun, 30 Oct 2022 08:48:16 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1BC65B80EC1; Sun, 30 Oct 2022 15:48:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0402C433D6; Sun, 30 Oct 2022 15:48:11 +0000 (UTC) Date: Sun, 30 Oct 2022 11:48:28 -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, Tejun Heo , Lai Jiangshan , John Stultz Subject: Re: [RFC][PATCH v2 20/31] timers: usb: Use del_timer_shutdown() before freeing timer Message-ID: <20221030114828.58fdd5d0@gandalf.local.home> In-Reply-To: <5ee0b72c-3942-8981-573f-73d97ea7ef08@roeck-us.net> References: <20221027150525.753064657@goodmis.org> <20221027150928.983388020@goodmis.org> <4e61935b-b06b-1f2d-6c2b-79bdfd569cd6@roeck-us.net> <20221028140129.040d9acc@gandalf.local.home> <20221028141007.05f5c490@gandalf.local.home> <20221028195959.GA1073367@roeck-us.net> <20221029145241.GA3296895@roeck-us.net> <20221029151952.076821f2@gandalf.local.home> <5ee0b72c-3942-8981-573f-73d97ea7ef08@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 Sat, 29 Oct 2022 15:56:25 -0700 Guenter Roeck wrote: > >> WARNING: CPU: 0 PID: 9 at lib/debugobjects.c:502 debug_print_object+0xd0/0x100 > >> ODEBUG: free active (active state 0) object type: timer_list hint: neigh_timer_handler+0x0/0x480 > >> > >> That happens with almost every test, so I may have missed some others > >> in the noise. > > > > Can you add this? > > > > It doesn't make a difference. Ah, it also requires this (I have other debugging in that file, so it may only apply with some fuzzing): -- Steve diff --git a/kernel/time/timer.c b/kernel/time/timer.c index ac2e8beb4235..f2ccf24a8448 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1282,6 +1296,11 @@ int __del_timer(struct timer_list *timer, bool free) debug_timer_deactivate(timer, true); } raw_spin_unlock_irqrestore(&base->lock, flags); + } else if (free) { + base = lock_timer_base(timer, &flags); + timer->function = NULL; + debug_timer_deactivate(timer, true); + raw_spin_unlock_irqrestore(&base->lock, flags); } return ret;