public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Huisong Li <lihuisong@huawei.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	rafael@kernel.org, rafael.j.wysocki@intel.com,
	wanghuiqiang@huawei.com, zhangzekun11@huawei.com,
	wangxiongfeng2@huawei.com, tanxiaofei@huawei.com,
	guohanjun@huawei.com, xiexiuqi@huawei.com,
	wangkefeng.wang@huawei.com, huangdaode@huawei.com
Subject: Re: [PATCH V2 2/2] mailbox: pcc: fix 'pcc_chan_count' when fail to initialize PCC
Date: Fri, 11 Nov 2022 14:14:02 +0000	[thread overview]
Message-ID: <20221111141402.7cun26euzubpesjs@bogus> (raw)
In-Reply-To: <20221111024448.25012-3-lihuisong@huawei.com>

Change $subject as
"mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure"

On Fri, Nov 11, 2022 at 10:44:48AM +0800, Huisong Li wrote:
> Currently, 'pcc_chan_count' is a non-zero value if PCC subspaces are parsed
> successfully and subsequent processes is failure during initializing PCC
> process. This may cause that pcc_mbox_request_channel() can still be
> executed successfully , which will misleads the caller that this channel is
> available.
>

I would reword this something like:
"Currently, 'pcc_chan_count' is remains set to a non-zero value if PCC
subspaces are parsed successfully but something else fail later during
the initial PCC probing phase. This will result in pcc_mbox_request_channel()
trying to access the resources that are not initialised or allocated and
may end up in a system crash.

Reset pcc_chan_count to 0 when the PCC probe fails in order to prevent
the possible issue as described above.
"

> Fixes: ce028702ddbc ("mailbox: pcc: Move bulk of PCCT parsing into pcc_mbox_probe")

Other than that,

Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

  reply	other threads:[~2022-11-11 14:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  1:50 [PATCH 0/3] ACPI: PCC: optimize pcc codes and fix one bug Huisong Li
2022-11-10  1:50 ` [PATCH 1/3] mailbox: pcc: rename platform interrupt bit macro name Huisong Li
2022-11-10 10:25   ` Sudeep Holla
2022-11-10 12:17     ` lihuisong (C)
2022-11-10 19:29       ` Rafael J. Wysocki
2022-11-11  1:10         ` lihuisong (C)
2022-11-10  1:50 ` [PATCH 2/3] ACPI: PCC: add check for platform interrupt Huisong Li
2022-11-10 10:36   ` Sudeep Holla
2022-11-10 12:08     ` lihuisong (C)
2022-11-10  1:50 ` [PATCH 3/3] mailbox: pcc: fix 'pcc_chan_count' when fail to initialize PCC Huisong Li
2022-11-10 10:44   ` Sudeep Holla
2022-11-10 12:10     ` lihuisong (C)
2022-11-11  2:44 ` [PATCH V2 0/2] optimize pcc code and fix one bug Huisong Li
2022-11-11  2:44   ` [PATCH V2 1/2] ACPI: PCC: add check for platform interrupt Huisong Li
2022-11-11 14:26     ` Sudeep Holla
2022-11-12  1:27       ` lihuisong (C)
2022-11-11  2:44   ` [PATCH V2 2/2] mailbox: pcc: fix 'pcc_chan_count' when fail to initialize PCC Huisong Li
2022-11-11 14:14     ` Sudeep Holla [this message]
2022-11-12  2:05 ` [PATCH V3 0/2] Optimize PCC OpRegion code and reset pcc_chan_count Huisong Li
2022-11-12  2:05   ` [PATCH V3 1/2] ACPI: PCC: Setup PCC Opregion handler only if platform interrupt is available Huisong Li
2022-11-12  2:05   ` [PATCH V3 2/2] mailbox: pcc: Reset pcc_chan_count to zero in case of PCC probe failure Huisong Li
2022-11-23 18:28   ` [PATCH V3 0/2] Optimize PCC OpRegion code and reset pcc_chan_count Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111141402.7cun26euzubpesjs@bogus \
    --to=sudeep.holla@arm.com \
    --cc=guohanjun@huawei.com \
    --cc=huangdaode@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --cc=tanxiaofei@huawei.com \
    --cc=wanghuiqiang@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=wangxiongfeng2@huawei.com \
    --cc=xiexiuqi@huawei.com \
    --cc=zhangzekun11@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox