merged.

Bruce

In message: [linux-yocto][v5.10/standard/nxp-sdk-5.10/nxp-soc & 
v5.10/standard/preempt-rt/nxp-sdk-5.10/nxp-soc][PATCH] qoriq_thermal.c: crash 
of error device pointer value
on 22/05/2023 Li Wang wrote:

> qoriq_tmu_probe ->
> qoriq_tmu_register_tmu_zone ->
> devfreq_cooling_register: return 0
> sensor->cdev->type: crash
> 
> the fix codes come from:
> https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/include/linux/device_cooling.h
> 
> Unable to handle kernel NULL pointer dereference at virtual address 
> 0000000000000008
> pc : qoriq_tmu_probe+0x568/0x5b0
> lr : qoriq_tmu_probe+0x440/0x5b0
> Call trace:
> qoriq_tmu_probe+0x568/0x5b0
> ...
> Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
> 
> Signed-off-by: Li Wang <li.w...@windriver.com>
> ---
>  include/linux/device_cooling.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/device_cooling.h b/include/linux/device_cooling.h
> index 18d9e3b90ed9..f318e22c1472 100644
> --- a/include/linux/device_cooling.h
> +++ b/include/linux/device_cooling.h
> @@ -33,7 +33,7 @@ int unregister_devfreq_cooling_notifier(struct 
> notifier_block *nb)
>  static inline
>  struct thermal_cooling_device *devfreq_cooling_register(void)
>  {
> -     return NULL;
> +     return ERR_PTR(-EINVAL);
>  }
>  
>  static inline
> -- 
> 2.35.5
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12645): 
https://lists.yoctoproject.org/g/linux-yocto/message/12645
Mute This Topic: https://lists.yoctoproject.org/mt/99063446/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy
 [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to