lkml.org 
[lkml]   [2021]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] mlxsw: thermal: Fix null dereference of NULL temperature parameter
On Wed, Jun 09, 2021 at 06:56:57PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The call to mlxsw_thermal_module_temp_and_thresholds_get passes a NULL
> pointer for the temperature and this can be dereferenced in this function
> if the mlxsw_reg_query call fails. The simplist fix is to pass the
> address of dummy temperature variable instead of a NULL pointer.
>
> Addresses-Coverity: ("Explicit null dereferenced")
> Fixes: 72a64c2fe9d8 ("mlxsw: thermal: Read module temperature thresholds using MTMP register")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Thanks

\
 
 \ /
  Last update: 2021-06-09 20:07    [W:0.041 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site