Linux Power Management development
 help / color / mirror / Atom feed
From: Jie Zhan <zhanjie9@hisilicon.com>
To: <cw00.choi@samsung.com>, Chanwoo Choi <chanwoo@kernel.org>,
	<cwchoi00@gmail.com>, Yaxiong Tian <tianyaxiong@kylinos.cn>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>, <nm@ti.com>
Subject: Re: [PATCH v2 0/4] Fix some errors in the devfreq core layer when governor is NULL
Date: Wed, 29 Apr 2026 10:04:58 +0800	[thread overview]
Message-ID: <d4126b42-d76c-4c4b-b08f-797822572f75@hisilicon.com> (raw)
In-Reply-To: <5563d184-f867-40a0-ac39-93fa60969164@kylinos.cn>



On 4/28/2026 10:59 AM, Yaxiong Tian wrote:
> 
> 在 2026/4/28 10:50, Jie Zhan 写道:
>>
>> On 4/1/2026 11:28 AM, Yaxiong Tian wrote:
>>> While doing some development work with devfreq_add_governor()/
>>> devfreq_remove_governor(), I discovered several bugs caused when
>>> devfreq->governor is NULL. Specifically:
>>>
>>> 1) A possible null pointer issue in devfreq_add_governor(), caused
>>> by devfreq_remove_governor() setting devfreq->governor to NULL in
>>> certain situations, while devfreq_add_governor() lacks corresponding
>>> checks for devfreq->governor.
>>>
>>> 2) When operating on governor and available_governors under /sys,
>>> there are also some unexpected errors.
>>>
>>> For issue 1, the solution is similar to Jie Zhan's PATCH.
>>> https://lore.kernel.org/linux-pm/20260326123428.800407-6-zhanjie9@hisilicon.com/
>>>
>>> The original v1 approach actually changed the original logic, which is incorrect.
>>>
>>> See the following patches for details.
>>>
>>> change in v2:
>>> 1) rebase to  linux-next(20260326) /devfreq-next
>>> 2) remove some code to fix null pointer in patch1
>>> 3) add  sysfs_update_group() in patch2
>>>
>>>
>>> Yaxiong Tian (4):
>>>    PM / devfreq: Fix possible null pointer issue in
>>>      devfreq_add_governor()
>>>    PM / devfreq: Fix available_governors_show() when no governor is set
>>>    PM / devfreq: Fix governor_store() failing when device has no current
>>>      governor
>>>    PM / devfreq: Optimize error return value of governor_show()
>>>
>>>   drivers/devfreq/devfreq.c | 57 +++++++++++----------------------------
>>>   1 file changed, 16 insertions(+), 41 deletions(-)
>>>
>> Hi Yaxiong,
>>
>> Any plan for updating this in the 7.1 cycle?
>>
>> Jie
> No plans for now. I tried using BT4 and found that it can automatically extract your tags. Currently, we only have some disagreements on patch 4. This patch isn't very important and can be ignored. Let's just wait for the maintainers to decide—maybe your solution or someone else's will be better.
Sure.


Hi Chanwoo,

Can you take a look at Patch 1-3 and check if they can be applied?

We have some following patches in development that depends on this.

PS: Sorry I'm not sure which email address gets to you easier, so include
them all!

Thanks!
Jie


	

      reply	other threads:[~2026-04-29  2:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  3:28 [PATCH v2 0/4] Fix some errors in the devfreq core layer when governor is NULL Yaxiong Tian
2026-04-01  3:30 ` [PATCH v2 1/4] PM / devfreq: Fix possible null pointer issue in devfreq_add_governor() Yaxiong Tian
2026-04-02  3:06   ` Jie Zhan
2026-04-29 21:49   ` Choi Chanwoo
2026-04-01  3:30 ` [PATCH v2 2/4] PM / devfreq: Fix available_governors_show() when no governor is set Yaxiong Tian
2026-04-02  3:10   ` Jie Zhan
2026-04-29 21:49   ` Choi Chanwoo
2026-04-01  3:31 ` [PATCH v2 3/4] PM / devfreq: Fix governor_store() failing when device has no current governor Yaxiong Tian
2026-04-02  3:21   ` Jie Zhan
2026-04-02  5:47     ` Yaxiong Tian
2026-04-02  6:52       ` Jie Zhan
2026-04-29 22:28   ` Choi Chanwoo
2026-04-30  3:29     ` Yaxiong Tian
2026-04-30  3:20   ` [PATCH v3 " Yaxiong Tian
2026-05-10 12:50     ` Choi Chanwoo
2026-04-01  3:31 ` [PATCH v2 4/4] PM / devfreq: Optimize error return value of governor_show() Yaxiong Tian
2026-04-02  3:38   ` Jie Zhan
2026-04-29 21:50   ` Choi Chanwoo
2026-04-28  2:50 ` [PATCH v2 0/4] Fix some errors in the devfreq core layer when governor is NULL Jie Zhan
2026-04-28  2:59   ` Yaxiong Tian
2026-04-29  2:04     ` Jie Zhan [this message]

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=d4126b42-d76c-4c4b-b08f-797822572f75@hisilicon.com \
    --to=zhanjie9@hisilicon.com \
    --cc=chanwoo@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=cwchoi00@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=nm@ti.com \
    --cc=tianyaxiong@kylinos.cn \
    /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