public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 0/4] Fix some errors in the devfreq core layer when governor is NULL
@ 2026-03-19  9:14 Yaxiong Tian
  2026-03-19  9:16 ` [PATCH RESEND 1/4] PM / devfreq: Fix possible null pointer issue in devfreq_add_governor() Yaxiong Tian
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Yaxiong Tian @ 2026-03-19  9:14 UTC (permalink / raw)
  To: myungjoo.ham, kyungmin.park, cw00.choi, nm
  Cc: linux-pm, linux-kernel, Yaxiong Tian

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.

See the following patches for details.

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 | 46 +++++++++++++++++++++------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-03-31 10:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-19  9:14 [PATCH RESEND 0/4] Fix some errors in the devfreq core layer when governor is NULL Yaxiong Tian
2026-03-19  9:16 ` [PATCH RESEND 1/4] PM / devfreq: Fix possible null pointer issue in devfreq_add_governor() Yaxiong Tian
2026-03-31  7:04   ` Jie Zhan
2026-03-31  7:49     ` Yaxiong Tian
2026-03-31  8:49       ` Jie Zhan
2026-03-31  9:17         ` Yaxiong Tian
2026-03-31  9:28           ` Jie Zhan
2026-03-19  9:17 ` [PATCH RESEND 2/4] PM / devfreq: Fix available_governors_show() when no governor is set Yaxiong Tian
2026-03-31  7:08   ` Jie Zhan
2026-03-19  9:17 ` [PATCH RESEND 3/4] PM / devfreq: Fix governor_store() failing when device has no current governor Yaxiong Tian
2026-03-31  7:16   ` Jie Zhan
2026-03-31  8:02     ` Yaxiong Tian
2026-03-31  8:53       ` Jie Zhan
2026-03-31  9:30         ` Yaxiong Tian
2026-03-31  9:37           ` Jie Zhan
2026-03-31  9:54             ` Yaxiong Tian
2026-03-31 10:12               ` Yaxiong Tian
2026-03-19  9:17 ` [PATCH RESEND 4/4] PM / devfreq: Optimize error return value of governor_show() Yaxiong Tian
2026-03-31  7:21   ` Jie Zhan
2026-03-31  8:03     ` Yaxiong Tian
2026-03-25 10:06 ` [PATCH RESEND 0/4] Fix some errors in the devfreq core layer when governor is NULL Jie Zhan
     [not found] ` <1774486650723160.85.seg@mailgw.kylinos.cn>
2026-03-27  1:55   ` Yaxiong Tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox