Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3339997iob; Mon, 16 May 2022 19:59:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiwS5MV0IphLuZMdAmF/q8jTuTsntcStLNQwoqxXfFrL87GmitLlhTn8ZeSR2Ec3lCX17s X-Received: by 2002:a17:907:6d94:b0:6f4:531d:742 with SMTP id sb20-20020a1709076d9400b006f4531d0742mr17710650ejc.202.1652756372065; Mon, 16 May 2022 19:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652756372; cv=none; d=google.com; s=arc-20160816; b=jmVRaIwo998rc+YAz4vxJKtmUdsu7Capf4S++UWzGkg1Y99KTuKDGsqKBvBY9nGXtk e8ckx27KOkEckpDyYd/ZTqNnRG4MxgxAzIMIhBpJBOUunMBkz4gl+gGdm6r73qqwSaJS 080+oNFeRN7y9OXI0DqEeMWmIxTCzzc3CtOghhYlXe2s3nGlYLLzDiSjqYOLf3KGVFL2 0Oh1yZIPmHkaVhOTQujSONA+cIxPbtXscZi+LlA9mq8B5NpeU5At4QSwCBttLezi6owT pyNtBdE59Ji17CqjmEMQ91obPQmLrMmvh58X6WglnwtEvHWJmvu6ZmftcTOoSJxm0r+J DG1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dTo0qY4qQgxJkitwVcq8KgHfBlJlWID4iFoIHlxueiw=; b=O1E7NWi5aRwjhz2OH3BIt0LCNbUcGL6rq/O8sqhaIvzRx3XyarkKSmQPs1ZCuI3FxC IxWfZuhG/sVg6xRFqytie6W4VCdkZmTaTUaONyvYFbISn+eQCp+jcoFfBkTPJtDfg+lw vHQHI2ptZcgJnueYe5TUtmFZJElroxBBI2LoOr7w74nv6XEUbbNiWT7Soe+ZmJ51+HZa ACRnuTa9eDPcbEPkUGixJdAUwPqgxOZ8i6Mek2lxOEKrifN3UoK26fcCe0RrEIYww+sP Uds8qojcideWt2af4f7wf5SREpwsC/cvw+er2G0QPJW+wXSFeUqbIZ2mrjWUMJ6gNOkR VEWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dru+4XMr; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t19-20020aa7d4d3000000b0042a8b16a26esi7503203edr.518.2022.05.16.19.59.07; Mon, 16 May 2022 19:59:32 -0700 (PDT) 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=@linaro.org header.s=google header.b=Dru+4XMr; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242570AbiEPKZU (ORCPT + 99 others); Mon, 16 May 2022 06:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242802AbiEPKZF (ORCPT ); Mon, 16 May 2022 06:25:05 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACFFBDEF5 for ; Mon, 16 May 2022 03:25:02 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id f4so15373841iov.2 for ; Mon, 16 May 2022 03:25:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dTo0qY4qQgxJkitwVcq8KgHfBlJlWID4iFoIHlxueiw=; b=Dru+4XMrLKy46CAqyjByKC4XWPFK0jI7p3XA5l6APRqrSdI96JioqoD0fQvTtDjqzJ Mom8RxPWUtGPP3N2x9FxhMXrKHLEGo8ZWpBxpJ6+WJYvspSkcZih8QXM362BZqBRwC+g NMINHuHxAR8LOm3RNBCtJ41enhyyORWyIqPAIEtywX1rCjC2JTaJlXY3NCJgCyxDfa9n f1J8ENAxM5i3H2V+YTS0MGpSiOlKnDUVNq3QKBx4o+vekhrE+nT1cg9LdnuA+7uYBEDp GRhHsaEqOuI5MwsFJuzFPDbEGympXbYEplB95NtWdooQT1TJag7QL4W9E3O+KkaLCQrk DnWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dTo0qY4qQgxJkitwVcq8KgHfBlJlWID4iFoIHlxueiw=; b=VkVWJnu7+S+khNJQQDF1X4jeB6U3Up4FbzSPKlBsKzYLrXLD9uy8ZwlBH21Dpodazw pbLzhBt8FI23om9bedVPUqf/k9ZB1FKTyQhrLtp95iiXhhju46NRa+mt99BkI3NdVE4g zZ7jvNhbElk2e1TPa28lHMOdVKMwSbRmp/iY0GKcTmo9zkpgPokkcDlLaRHVGjttH8BD D/lBDGAlw98TtilatFZFEPAIl2Ep1LzJPTXTcmBR+k42oWubH/3hs8AVoPCmUvgDOR2M xoxU1rxjLKWc/n7gNBqS9r5x8khbbuRCP4vtyLZ77F1t0Ox1qXH7XCvFn/RA3QfBRtbU 3IYA== X-Gm-Message-State: AOAM532gA2unBeAHfISdddfL+75nlw4KU7Bq/7RQ/ykz1rDbvyDW9za2 K4r0mZ7hVCaBcpwMlJM974Y7rytlFwKGKZB44rLd6w== X-Received: by 2002:a05:6602:1591:b0:60f:6acc:6979 with SMTP id e17-20020a056602159100b0060f6acc6979mr7772505iow.173.1652696702110; Mon, 16 May 2022 03:25:02 -0700 (PDT) MIME-Version: 1.0 References: <20220516030251.42323-1-schspa@gmail.com> In-Reply-To: <20220516030251.42323-1-schspa@gmail.com> From: Viresh Kumar Date: Mon, 16 May 2022 11:24:50 +0100 Message-ID: Subject: Re: [PATCH v6 1/2] cpufreq: Abort show/store for half initialized policy To: Schspa Shi Cc: rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2022 at 04:03, Schspa Shi wrote: > > If policy initialization fails after the sysfs files are created, > there is a possibility that we may end up running show()/store() > callbacks for half initialized policies, which may have unpredictable > outcomes. > > Abort show/store in such a case by making sure the policy is active. > Also inactivate the policy on such failures. > > Signed-off-by: Schspa Shi Acked-by: Viresh Kumar