Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2180416rdb; Sun, 11 Feb 2024 15:52:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHijm0Aey4QMv/NE6AvCb0jEhzigPhBiBWzMnebX2pt8CsReEx0QkkhCQMOd780RmVVjTUq X-Received: by 2002:a05:6402:33c8:b0:560:e4d8:ccca with SMTP id a8-20020a05640233c800b00560e4d8cccamr3812329edc.28.1707695543090; Sun, 11 Feb 2024 15:52:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707695543; cv=pass; d=google.com; s=arc-20160816; b=F+HkyoH2R4zKQla/lnbmre5ruDNfk8Ql9P77yR1EcIC+0TqS1yQj0j8GdAroDRsfI+ JirJDsJtPJAtDsYZXNgiLWICdCZDMFgq7TVrSjWPyXr1YY+VnRJxDNJjzo/huoT/+dVz 1oZ/EpywF+MUO1+jhLH3xvl8BummGTwSPWHr0uTfAzamCxVs03gKzueCUJyzJwiUKdjf +2YiTuPvCZrYAJXal7sLhEJtyV/pSUapR5v/Ha0DmBeY1F51voxitMzO4nhiqf/cnJIJ DuwIvGoTKBeAJCHKpGiPC9V/ZNVW9vis91g2E9DWc1sr99FGATW4zlEalptj8nreGQyh JF0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=IMiP40KbV9wZozYYHWOgNE0Ph2d3x1wnOAFT2nZOhok=; fh=JXuNrNvkAHSuKxDtzexbSB4Yshgdx8uPAOcEXnEtkYc=; b=pTRRbaENIi5P3Vg//GurZM9ltd5/QC+2WQ67aK3zwuTICViQNNGfGdmkfoNrXN/kil aUx4t8xrcpVmFGTJa1npFDuL8V2D9lSLT2xXnSkz6NnXGGQgS9MfPmBFKytGtmUmvklb kKLn8Kv8Hh57FU87wAfJLpdh5uojZ+zZhlBVz7jsAUeZC5ccnk2+GAVgVBJN7J+onU5E oa0huCcIpdlFqmSrznMEj6gwKKe9w92v7dEUeCn5LCFu8IG8C+5EzAKnQHmrIzcuB285 Y3WenBDE8mJJG9grhoxyAao4luXhOI/pZZoBu6TsmEhDOHY3NzTbpuCspv/h3lB3xCBL zEDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b="kNtNTle/"; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-61024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com X-Forwarded-Encrypted: i=2; AJvYcCVgllNraYDOA5p4RCvQdCiPnbewpGF45dz1dfeQLsfhEDwwP8VFWfInCr61cplEVQ36PAVssYI6NA2ptP6neLdNlPa1eH3zZL5I749Y6g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bt14-20020a0564020a4e00b00560c11ae1e0si2246000edb.395.2024.02.11.15.52.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 15:52:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b="kNtNTle/"; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-61024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CEF701F21310 for ; Sun, 11 Feb 2024 23:52:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FD9217561; Sun, 11 Feb 2024 23:52:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="kNtNTle/" Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B601E17557; Sun, 11 Feb 2024 23:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.18.73.165 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707695533; cv=none; b=VOUuhfW7vP1qqnxNlX903OIKpH9bYcBGNxpfWzHXhXCFOAyjfYTi97kyxvnVoJ7rcwT6rj0WM50fOmp9Cju/5aKKubf4wervJFNNbxnx8X22pOG6G+txIaQ8g9j4uTkICzcJb2EDZglQNmzWxfRO8DpRZA15tAOahCh1H64+zLs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707695533; c=relaxed/simple; bh=lkgoJmksyXGMZ3z/tr7z4ObnZYK5CflsLDGo0yBYGV4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=rbxseMzviCUkslZxNdsZhWm3wO7rFQaH9w7KtxaAcBpEyWui2dTzYtaFHh7QCum2xCA0hV7uOmzjjzHsWlpO9eUKzbp8xTKX/G3tUv1RnCcsCBpOvw560v5gZiSFkVPtqk0IyofBOXKJo0z/s7Co8GO8yA6Xcf8Sp4E9oDTnCCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=kNtNTle/; arc=none smtp.client-ip=37.18.73.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 04368100008; Mon, 12 Feb 2024 02:52:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 04368100008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1707695527; bh=IMiP40KbV9wZozYYHWOgNE0Ph2d3x1wnOAFT2nZOhok=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=kNtNTle/RZipPAFjGEP5tKgjDqH7AH1NsdRvCStWpKRXRS8zjTxxQmbh0bUdpxWrH Lnv5mH6RZQh5vLKMuB8qTl3VMsmm+xmo5BGW5WIRV3y//9BFe0exM94ahwBzfuW6Hz R33y0nHOlmi+2QmTbfswXzJwSZ+nnCHgrKx0LLUj1gPr+jMU9dh377Ma8zGmB5JFUV PFn2PZuo4cP1IffurE76oZp6vjV1ROH9vUfunCC5NA1svLdW5aV1+ZquGT/8mMSlo8 KhRZMRSt15qSMqzfM0atHzHi3B3BcTXoBJLFKxxG50/yZvL8hY8oKwSW9suacJ14sn zfHwGvwPzL7Aw== Received: from smtp.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Mon, 12 Feb 2024 02:52:06 +0300 (MSK) Received: from [172.28.160.241] (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 12 Feb 2024 02:52:06 +0300 Message-ID: Date: Mon, 12 Feb 2024 02:52:06 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem Content-Language: en-US To: Andy Shevchenko CC: , , , , , , , , , , , , , , , , Lee Jones , References: <20231214173614.2820929-1-gnstark@salutedevices.com> <20231221151111.GJ10102@google.com> From: George Stark In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 183351 [Feb 11 2024] X-KSMG-AntiSpam-Version: 6.1.0.3 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_uf_ne_domains}, {Tracking_urls_end_caps}, {Tracking_from_domain_doesnt_match_to}, salutedevices.com:7.1.1;smtp.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;lore.kernel.org:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2024/02/11 23:16:00 X-KSMG-LinksScanning: Clean, bases: 2024/02/11 23:16:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/02/11 20:38:00 #23539253 X-KSMG-AntiVirus-Status: Clean, skipped Hello Andy. I haven't lose hope for the devm_mutex thing and keep pinging those guys from time to time. Sure I can single out the fix-only patch I'll do it tomorrow. On 2/9/24 20:11, Andy Shevchenko wrote: > On Thu, Dec 21, 2023 at 03:11:11PM +0000, Lee Jones wrote: >> On Thu, 14 Dec 2023, George Stark wrote: >> >>> This patch series fixes the problem of devm_led_classdev_register misusing. >>> >>> The basic problem is described in [1]. Shortly when devm_led_classdev_register() >>> is used then led_classdev_unregister() called after driver's remove() callback. >>> led_classdev_unregister() calls driver's brightness_set callback and that callback >>> may use resources which were destroyed already in driver's remove(). >>> >>> After discussion with maintainers [2] [3] we decided: >>> 1) don't touch led subsytem core code and don't remove led_set_brightness() from it >>> but fix drivers >>> 2) don't use devm_led_classdev_unregister >>> >>> So the solution is to use devm wrappers for all resources >>> driver's brightness_set() depends on. And introduce dedicated devm wrapper >>> for mutex as it's often used resource. >>> >>> [1] https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895e2b@salutedevices.com/T/ >>> [2] https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895e2b@salutedevices.com/T/#mc132b9b350fa51931b4fcfe14705d9f06e91421f >>> [3] https://lore.kernel.org/lkml/8704539b-ed3b-44e6-aa82-586e2f895e2b@salutedevices.com/T/#mdbf572a85c33f869a553caf986b6228bb65c8383 > > ... > >> FYI: I'll conduct my review once the locking side is settled. > > To reduce burden can you apply the first one? It's a fix. > -- Best regards George