Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4095791rdb; Mon, 11 Dec 2023 08:42:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IHn/EPrCgwcIc/Z63a8CswPZdDVDRLH+0LjXvrlEvMAPGtxEUDik7oNSTQAWb7fEjXmoBGF X-Received: by 2002:a17:902:dac1:b0:1d0:8383:742c with SMTP id q1-20020a170902dac100b001d08383742cmr2888885plx.39.1702312952994; Mon, 11 Dec 2023 08:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702312952; cv=none; d=google.com; s=arc-20160816; b=fnaJeJrd9Tv65u7TN4eK95Di+HW0WxKXOwClLpXuwgj3EpmzWuyDEIrM3QfwpvL3gU yW3PgkJ0ctsgCdgI9rdHhE95iS0N+wo5wS9I1aj9rpBca8ynrwGjJ/i9C/6U+A4pOz7B O2YMe9OLwDRkqA5MALVJdSCqzawFchsbrriihWaXL6T4+CLLZ6mZUMDBzCirG7WtJbVw BlXjGxaKRcASz2zo+e86QKNehzm6obTYmiVuXLybDxVd7DYRShe7m+rdNmUfVwEFTY80 WdrFNNYWfMrxzDzCC7HdxT46TC1zZl3hKvv7z6iWsk4PZMXJFQwFw+6f6nwsjFT1avoP U//w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=UiqNYItmbeX8AQ2uqX5Ze6EN/o20yOI0BHyKq1CcHrk=; fh=uDfSeyQcicFPe9yKG3eLk/KL9G6+nqtKqMbn80XCcZM=; b=QTG+vbIBeYTUVm96RR71clptmMisIRD8rKeAtT+z/dKpzbU2fIxS+ponHH0iq/zeee 7UVacfF9IMxOxRf2bVFbiNrC4fyGU0YCcvypEjUo1907Am+N5WM6AXiF+e9bED31DbXw Erqgz5cO2H9eBcuj66xzyr0vcPLtuZUl8QYPePqbADlO+aGYjKAmQNKzZRfAfR+lekZX gWc0LM+T6Y6rEx5+cgM+e2qQbn2Wb70d7sy/RcD/SQJfZ15fjSIQLO0TyP5dLgkDX6HR Rl12PXJUFPQyvt+1jY6B5h9pDKgj/gXtLA81iElqjbY+4JYHszvCyINNC7GxA48Syaml YA4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id c22-20020a170902b69600b001d0a3ab370asi5681298pls.326.2023.12.11.08.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 08:42:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DE124804BC01; Mon, 11 Dec 2023 08:42:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344506AbjLKQmK convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Dec 2023 11:42:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbjLKQmJ (ORCPT ); Mon, 11 Dec 2023 11:42:09 -0500 Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53ABBB3; Mon, 11 Dec 2023 08:42:15 -0800 (PST) Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-1ff010595f6so279162fac.1; Mon, 11 Dec 2023 08:42:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702312934; x=1702917734; h=content-transfer-encoding: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=9WJcvJcL3yAkFCnOTaVPfSy6UlxoNxbtX+zUdQ6UhZE=; b=wAETMmGsD21TGzTwZS8rd3+MeAOKHSUmIfJEVA+uHl4L3Y6OuBjH5JiArcGdDpqSLD tJvwYUCdnuRxq3Uj1DSjCcT285dDDfz1CJ7TCQCAWZwxpjDFj6CRxlDhbSI41GDTjLHo MBPHt4s5QL8JbGqV2ShRVnUlp0vcoi5Mx6SWTeiqdy9HL6Wrz8jZk8V/iR+K2D2lxfeJ nE7dQY2WD35JnvnJZaCqvyz+tjngUGiA3AS5CJ/gTfo/xh14aDmCTufD52DVAC+RoM7a CQSuHrR32PefncgETcw0nK7tSZZZuCgXks/j4VocKLGauCcGyDp43ODNxhvpXuQmDTRq /7NA== X-Gm-Message-State: AOJu0Yx9fQDA7Je4VANY54v3mIw+eGqBx28YQtI+sz5lZwRfnA9wW2qs 2rml5Rw0DlXtOczY3LVyZJXjdTsZ7iM0vkCXE88= X-Received: by 2002:a05:6870:961d:b0:1fb:1576:ee66 with SMTP id d29-20020a056870961d00b001fb1576ee66mr8573877oaq.5.1702312934566; Mon, 11 Dec 2023 08:42:14 -0800 (PST) MIME-Version: 1.0 References: <1880915.tdWV9SEqCh@kreacher> <13414639.uLZWGnKmhe@kreacher> <0a0d5dd4-6b7a-428b-8ef1-bb6aff76fb51@linaro.org> In-Reply-To: <0a0d5dd4-6b7a-428b-8ef1-bb6aff76fb51@linaro.org> From: "Rafael J. Wysocki" Date: Mon, 11 Dec 2023 17:42:03 +0100 Message-ID: Subject: Re: [PATCH v1 1/3] thermal: core: Make thermal_zone_device_unregister() return after freeing the zone To: Daniel Lezcano Cc: "Rafael J. Wysocki" , Linux PM , Srinivas Pandruvada , Zhang Rui , Linux ACPI , LKML , Lukasz Luba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 11 Dec 2023 08:42:28 -0800 (PST) On Mon, Dec 11, 2023 at 5:28 PM Daniel Lezcano wrote: > > On 08/12/2023 20:13, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Make thermal_zone_device_unregister() wait until all of the references > > to the given thermal zone object have been dropped and free it before > > returning. > > > > This guarantees that when thermal_zone_device_unregister() returns, > > there is no leftover activity regarding the thermal zone in question > > which is required by some of its callers (for instance, modular driver > > code that wants to know when it is safe to let the module go away). > > > > Subsequently, this will allow some confusing device_is_registered() > > checks to be dropped from the thermal sysfs and core code. > > > > Signed-off-by: Rafael J. Wysocki > > --- > > Definitively agree on the change > > Acked-by: Daniel Lezcano Thanks! > Would it make sense to use kref_get/put ? Why and where?