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 25C3AC433FE for ; Sat, 5 Nov 2022 18:28:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbiKES2x (ORCPT ); Sat, 5 Nov 2022 14:28:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbiKES2w (ORCPT ); Sat, 5 Nov 2022 14:28:52 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C97E09A for ; Sat, 5 Nov 2022 11:28:51 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id i12so5555220qvs.2 for ; Sat, 05 Nov 2022 11:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+1YQb6nXk/q0EHljp4F8v1bXvbOovOAnj80btawKRAY=; b=DONWs6/FiwPtVJ4h9P9G1D+xI2OZ4sOZ++B4h9lOUr90grPUMADKKtOkyMNK85AsEf yHs4XotTZQfbZFXiKO1vIPQf4cjf9p2EEuLbIK2DwoG1VitJXDxI/Fg0k/P20CNhLtpT 5yTAOviUwyDAlllMzqQFpJUoXjW0aoAYitY3g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+1YQb6nXk/q0EHljp4F8v1bXvbOovOAnj80btawKRAY=; b=DvJJivPKb2cRtBdFb2OxDrCbyGTXCr5ByjRcBZl7wlFExpdSdsQvHNQcPn6YU239s5 P3MjaWp+IZzGMu62Ohyf1jwTEHPCTaeh7LHjKfBPXk6n9j+YzuKrD3sD+AFq7PWj/1I0 B0Wr1m8Wmj6xtuDH13CaGV4eANwGYjH80tx/dZizaiyXzH4ChIPPTvaFskfuyApXT5y5 36NEviLDpJrYOABdTvrtuo23c9NrNcyIrtejRb17sTqa8lOpsS5jVZ7i2eYJ5TAsij2d mMumwCd23rvpAUxpMFm66ixQCTF8ch8YNHKx5m7M8jo6ZlMRZZNJ5bS9eMx64RwlztWz c8nA== X-Gm-Message-State: ACrzQf1XyGAQd7ctkmiPOw6WzIMomsqXL6DC8mtp32dxv4qfpiHBxmS7 bzTKbLXW4rdUTkEJUoMbJkV52LEq6j6peA== X-Google-Smtp-Source: AMsMyM4gWhlqzNSvpomd1+0Q/J/fY5vs8HEi1xT8J30SK+I450dgEl8fVBpBYXmaBXaLvRhtet+VLg== X-Received: by 2002:ad4:5e8b:0:b0:4b9:98bf:92cc with SMTP id jl11-20020ad45e8b000000b004b998bf92ccmr37837446qvb.128.1667672930318; Sat, 05 Nov 2022 11:28:50 -0700 (PDT) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com. [209.85.219.182]) by smtp.gmail.com with ESMTPSA id l2-20020ac80782000000b00343057845f7sm2215779qth.20.2022.11.05.11.28.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Nov 2022 11:28:49 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id y186so4636050yby.10 for ; Sat, 05 Nov 2022 11:28:49 -0700 (PDT) X-Received: by 2002:a25:bb02:0:b0:6ca:9345:b2ee with SMTP id z2-20020a25bb02000000b006ca9345b2eemr26793220ybg.362.1667672929161; Sat, 05 Nov 2022 11:28:49 -0700 (PDT) MIME-Version: 1.0 References: <20221105060024.598488967@goodmis.org> <20221105123642.596371c7@rorschach.local.home> <20221105140356.6a3da628@rorschach.local.home> In-Reply-To: <20221105140356.6a3da628@rorschach.local.home> From: Linus Torvalds Date: Sat, 5 Nov 2022 11:28:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-edac@vger.kernel.org, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-acpi@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, linux-pm@vger.kernel.org, drbd-dev@lists.linbit.com, linux-bluetooth@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, intel-gfx@lists.freedesktop.org, linux-input@vger.kernel.org, linux-parisc@vger.kernel.org, linux-leds@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linux-scsi@vger.kernel.org, linux-staging@lists.linux.dev, linux-ext4@vger.kernel.org, linux-nilfs@vger.kernel.org, bridge@lists.linux-foundation.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, lvs-devel@vger.kernel.org, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net, alsa-devel@alsa-project.org, Julia Lawall Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Sat, Nov 5, 2022 at 11:04 AM Steven Rostedt wrote: > > Here's the changes I made after running the script Please. No. What part of "I don't want extra crud" was I unclear on? I'm not interested in converting everything. That's clearly a 6.,2 issue, possibly even longer considering how complicated the networking side has been. I'm not AT ALL interested in "oh, I then added my own small cleanups on top to random files because I happened to notice them". Repeat after me: "If the script didn't catch them, they weren't trivially obvious". And it does seem that right now the script itself is a bit too generous, which is why it didn't notice that sometimes there wasn't a kfree after all because of a goto around it. So clearly that "..." doesn't really work, I think it accepts "_any_ path leads to the second situation" rather than "_all_ paths lead to the second situation". But yeah, my coccinelle-foo is very weak too, and maybe there's no pattern for "no flow control". I would also like the coccinelle script to notice the "timer is used afterwards", so that it does *not* modify that case that does del_timer(&dch->timer); dch->timer.function = NULL; since now the timer is modified in between the del_timer() and the kfree. Again, that timer modification is then made pointless by changing the del_timer() to a "timer_shutdown()", but at that point it is no longer a "so obvious non-semantic change that it should be scripted". At that point it's a manual thing. So I think the "..." in your script should be "no flow control, and no access to the timer", but do not know how to do that in coccinelle. Julia? And this thread has way too many participants, I suspect some email systems will just mark it as spam as a result. Which is partly *why* I would like to get rid of noisy changes that really don't matter - but I would like it to be truly mindlessly obvious that there are *zero* questions about it, and absolutely no manual intervention because the patch is so strict that it's just unquestionably correct. Linus