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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F9DBC433FE for ; Sun, 6 Nov 2022 03:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229567AbiKFDMy (ORCPT ); Sat, 5 Nov 2022 23:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbiKFDMu (ORCPT ); Sat, 5 Nov 2022 23:12:50 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90CB4CF4 for ; Sat, 5 Nov 2022 20:12:47 -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 sin.source.kernel.org (Postfix) with ESMTPS id AA580CE092D for ; Sun, 6 Nov 2022 03:12:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71FFCC433C1; Sun, 6 Nov 2022 03:12:43 +0000 (UTC) Date: Sat, 5 Nov 2022 23:12:41 -0400 From: Steven Rostedt To: Julia Lawall Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton Subject: Re: [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers Message-ID: <20221105231241.7513fc33@rorschach.local.home> In-Reply-To: References: <20221105060024.598488967@goodmis.org> <20221105123642.596371c7@rorschach.local.home> <20221105140356.6a3da628@rorschach.local.home> <20221105144303.3552bf85@rorschach.local.home> <775ada-29f1-3b56-7deb-c1b8d958e2c@inria.fr> <20221105203634.7e0b2e8e@rorschach.local.home> 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 6 Nov 2022 11:05:14 +0800 (+08) Julia Lawall wrote: > > Thinking that's what you meant (examples would be easier to understand, > > than descriptions). And it didn't cover the return case. Does it only > > cover gotos? > > > > See drivers/net/wireless/intel/iwlwifi/mvm/sta.c for the false positive case: > > > > del_timer_sync(&baid_data->session_timer); > > [..] > > But there is a kfree_rcu(baid_data, rcu_head); right below. So it looks > fine? D'oh! I think you are correct. I didn't trust the script and it appears that it was correct all along. The free was hidden in between the code and I only noticed the kfree() in the error path. I thought that was a bug in the script. :-/ I guess there were no false positives then. To be sure, I'll write a script to find all that have a return or goto in between and see what it comes up with. I guess my original patch doesn't need any changes from the script. I'll look more. Thanks Julia! -- Steve