Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5971683rwb; Mon, 14 Nov 2022 12:11:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Q7hNpus6l+wDhyZWQhv85pdd3NbnfRzqpOK2jPD1CLmfurEN8rc9hm1YLY3ujwbL2xLTY X-Received: by 2002:a63:2026:0:b0:46f:b2a5:6294 with SMTP id g38-20020a632026000000b0046fb2a56294mr13002090pgg.570.1668456710412; Mon, 14 Nov 2022 12:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668456710; cv=none; d=google.com; s=arc-20160816; b=TRIbSuvKNDBtmkCY07pkRzbNCTdz+m6uLi59bJV8Pd30TIZHFKNGWQmnGS7U3txKOZ HAUAo2u5q1/5jg7y1krN2YH34whk/sxmo6FVyLL01mTEWEF94oWJLU5uVZfHfLFdLR1F EgqljNEsFR52dVy4LJ9iHw74TjWt44rTWBiv7RYemkC5fhbauDdX79VK2SbcVc5zwFxo zErYYf/3ii+ewJTFWs4gvACEO+n8efVgsJWs8xcd31iPGm7lIJW/CCwI5y2o2JsK0Iec EvhJVCrHSI/TQOwTXiSrldrzZycIz6avfqQpiVofY5oct5ie0QrSRZaAnLhh52MelX+Y RgeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=j1EggVRVm0nioc+pWMxnSMEbvb3Nb3DHvMkPt+H9FP0=; b=fA8QFzxOMAMTygLE1Qe08s9gLt0udDemCQ4bxDc8t2U8cvaemlbDidz+RDcgN1Xpfz H4Se3FCVZs+VVm4RR9Iee/wqynjjytiUpEGhVWhyce46pSV0johZ946SpwPGiUMvHEyL cEj/k7kd+1p41HpiVRatCvQkxrtqE8tl9AJlq4QXT1oTe5ZV/FopArB9MskxCd01wTO9 60z7xcs+Ma/TQskZXHEWwYAd/cou4M9ey+trGYx/ZzhYbSzv1R/s9yGS0nzQJD85k6gB Yu/ZmeIKQzQKWxr2pNCtjpohCKDHklOAJblUCqVbjIQ5PBhDJv6PAjYtIpy/xPZAwRfs K18g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=S1beXo0H; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb15-20020a17090b35cf00b002131849ea4esi15134558pjb.140.2022.11.14.12.11.38; Mon, 14 Nov 2022 12:11:50 -0800 (PST) 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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=S1beXo0H; dkim=neutral (no key) header.i=@linutronix.de; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237062AbiKNTyU (ORCPT + 88 others); Mon, 14 Nov 2022 14:54:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235911AbiKNTyR (ORCPT ); Mon, 14 Nov 2022 14:54:17 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79534B39 for ; Mon, 14 Nov 2022 11:54:16 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668455654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j1EggVRVm0nioc+pWMxnSMEbvb3Nb3DHvMkPt+H9FP0=; b=S1beXo0HJFFk8FF0ct/xaMsp3NCjpBGP/7m1W8ufK85DgBYOib+E3Wq99yq85DAQsqlaTI IpCOCw/c+VM5a2+1UKRP1Gi0I/O4FFfN88/CMDB8uWi7dzW5M6ACCg6KRa/6i1BzhUhYSt +i6wCNrMtKUR7WxyP+FiCVgiBflfG2RZCm2sep11nF9Ug9D+CrLX3/43K/4vYjfoDymiCa iF9bx4xX/60ZkQE+2xym521rmH2i5Ksati4ko390buxVRTen6M7qhct9qOzdSrWRvPZu69 +ifgZ/bvCuqfcgXQYOk2M3XdXbDES7uZRo/dc1UahMWThJh3yEdSVjoLo7jAyQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668455654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j1EggVRVm0nioc+pWMxnSMEbvb3Nb3DHvMkPt+H9FP0=; b=Ntd4Kviz/ogS/PWkJdBPWnJMqaxRbn2Y1vm3xLIU/VWvv4h3EK8QAIypcMDZitZg024ui5 UtObFJkEEE65P9CQ== To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Julia Lawall Subject: Re: [PATCH v6 4/6] timers: Add timer_shutdown_sync() to be called before freeing timers In-Reply-To: <20221114142858.59682a42@gandalf.local.home> References: <20221110064101.429013735@goodmis.org> <20221110064147.343514404@goodmis.org> <875yfitpdu.ffs@tglx> <20221113191518.0a3b29b1@rorschach.local.home> <87sfims7ca.ffs@tglx> <20221114083635.60e23559@gandalf.local.home> <87bkp9s61z.ffs@tglx> <20221114142858.59682a42@gandalf.local.home> Date: Mon, 14 Nov 2022 20:54:13 +0100 Message-ID: <8735als462.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Mon, Nov 14 2022 at 14:28, Steven Rostedt wrote: > On Mon, 14 Nov 2022 20:13:28 +0100 > Thomas Gleixner wrote: >> The warning does not buy us anything, unless you want to go and amend >> all the usage sites which trigger it with 'if (mystruct->shutdown)' >> conditionals. > > The rationale for the warning was that it would let us know what drivers > need to be fixed for older kernels without the shutdown state. I'm > perfectly fine in removing the warning. We may just add it to the field > kernels so that we can know if there's any drivers that have issues that we > need to look at. The warning is not guaranteed to catch the subtle cases. It might happen once in a blue-moon. I rather argue that (once we agreed on the semantics) we should backport timer_shutdown() and the fixes which we add to Linus tree. Searching for potentially problematic places is a job for Coccinelle, though fixing them needs to have deep human inspection. Backporting the core code and the corresponding fixes is way simpler than identifying the problematic cases via the unreliable warning and then coming up with a per driver solution by sprinkling 'if (in_shutdown)' conditionals all over the place. Thanks, tglx