Thread (3 messages) flat view 3 messages, 3 authors, 2021-06-09

Re: [PATCH][next] mlxsw: thermal: Fix null dereference of NULL temperature parameter

From: Ido Schimmel <hidden>
Date: 2021-06-09 18:07:42
Also in: kernel-janitors, lkml

On Wed, Jun 09, 2021 at 06:56:57PM +0100, Colin King wrote:
From: Colin Ian King <redacted>

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 <redacted>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help