Skip to content
Snippets Groups Projects
Commit f4cee3af authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

mlxsw: core: Use devm_kzalloc to allocate mlxsw_hwmon structure


KASan reported use-after-free for the hwmon structure. So fix this by
using devm_kzalloc and let the core take care about freeing the memory
during device dettach.

Reported-by: default avatarIdo Schimmel <idosch@mellanox.com>
Fixes: 89309da3 ("mlxsw: core: Implement temperature hwmon interface")
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2010b93e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment