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 9E68FC43219 for ; Sat, 5 Nov 2022 18:29:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbiKES3E (ORCPT ); Sat, 5 Nov 2022 14:29:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229925AbiKES3D (ORCPT ); Sat, 5 Nov 2022 14:29:03 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90B3BF5AB for ; Sat, 5 Nov 2022 11:29:02 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id fz10so5023479qtb.3 for ; Sat, 05 Nov 2022 11:29:02 -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=OGqbQxl9HgSZmyyZiIhzRjk+70zX09U5dmT0TkuE8oK7mnntD/tZU5ert6tMUVn8rE PaTJZdgC4imf0DUBT3ctNmP9H2Px6ehB2+mnuZDJuWE1v9TSlTDZSPza1UmKPd2o4Aww qu4ZMYQqD20U55RzkomuUx70m+ShE4RC1y5tYjlfbfPeYDNF4R+BR2eEesrmB7Rgl2XA WsJy3EIhNDa0ihVF8tlMOZDMXe4KtOqzYugeP0ZEvSgcdcM0FknVLmcKhtY1luTpdDSE zbHNMMzStKxUH0jcsgJ+fnfCs7m0qn9trVn5SLb3Fi+4U6EgcMn0b34Xk4NENuwpkUqi 2I4A== X-Gm-Message-State: ACrzQf1VM3wBWXkWYjSaGH1jXYHIlQHWZfnN7oNj7SA4YifsKr9F6gYH xRxc6srIhWUGU5xqVdB7pn5woJkYyf99VA== X-Google-Smtp-Source: AMsMyM794Pa4onk+0h1x3NOEIonKotPKBeoMObmlpnGuhbaP9cMZmW0/MNy9PEcxyh6c8IWb29bSVQ== X-Received: by 2002:ac8:58d6:0:b0:39c:e89a:ac4b with SMTP id u22-20020ac858d6000000b0039ce89aac4bmr34590174qta.400.1667672941468; Sat, 05 Nov 2022 11:29:01 -0700 (PDT) Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com. [209.85.219.174]) by smtp.gmail.com with ESMTPSA id u14-20020a05620a430e00b006b640efe6dasm2301112qko.132.2022.11.05.11.28.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Nov 2022 11:29:00 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id n85so3681271yba.1 for ; Sat, 05 Nov 2022 11:28:59 -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-input@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