PM / devfreq: fix exynos-bus NULL pointer dereference
Subsystems (4)
PATCH 1/1 PM / devfreq: fix exynos-bus NULL pointer dereference
Fix exynos-bus NULL pointer dereference by correctly using the local generated freq_table to output the debug values instead of using the profile freq_table that is not used in the driver.
Reported-by Marek Szyprowski <[email protected]>
Tested-by Marek Szyprowski <[email protected]>
Fixes b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")
Signed-off-by Christian Marangi <[email protected]>
--- drivers/devfreq/exynos-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/devfreq/exynos-bus.c +3 -3
@@ -447,9 +447,9 @@ static int exynos_bus_probe(struct platform_device *pdev) } } - max_state = bus->devfreq->profile->max_state; - min_freq = (bus->devfreq->profile->freq_table[0 ] /1000 ); - max_freq = (bus->devfreq->profile->freq_table[max_state -1 ] /1000 ); + max_state = bus->devfreq->max_state; + min_freq = (bus->devfreq->freq_table[0 ] /1000 ); + max_freq = (bus->devfreq->freq_table[max_state -1 ] /1000 );pr_info ("exynos-bus: new bus device registered: %s (%6ld KHz ~ %6ld KHz)\n" ,dev_name (dev), min_freq, max_freq);
Signature · 1 line
2.36.1
Hi Christian,
Please change the patch title as following and resend it.
- PM / devfreq: exynos-bus: Fix NULL pointer dereference
I'll ask the next version to be merged directly into linux-pm.git.
Acked-by Chanwoo Choi <[email protected]>
Quoted 34 lines · Christian Marangi
Fix exynos-bus NULL pointer dereference by correctly using the local generated
freq_tableto output the debug values instead of using the profilefreq_tablethat is not used in the driver.Reported-by Marek Szyprowski <[email protected]>Tested-by Marek Szyprowski <[email protected]>Fixes b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")Signed-off-by Christian Marangi <[email protected]>--- drivers/devfreq/exynos-bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/devfreq/exynos-bus.c +3
-4@@ -447,9 +447,9 @@ static int exynos_bus_probe(struct platform_device *pdev) } } - max_state = bus->devfreq->profile->max_state; - min_freq = (bus->devfreq->profile->freq_table[0 ] /1000 ); - max_freq = (bus->devfreq->profile->freq_table[max_state -1 ] /1000 ); + max_state = bus->devfreq->max_state; + min_freq = (bus->devfreq->freq_table[0 ] /1000 ); + max_freq = (bus->devfreq->freq_table[max_state -1 ] /1000 );pr_info ("exynos-bus: new bus device registered: %s (%6ld KHz ~ %6ld KHz)\n" ,dev_name (dev), min_freq, max_freq); --2.36.1
Signature · 2 lines
Best Regards, Chanwoo Choi