Re: [patch net-next] mlxsw: core: Use devm_kzalloc to allocate mlxsw_hwmon structure

2015-12-22 Thread Jiri Pirko
Mon, Dec 21, 2015 at 04:12:06PM CET, j...@resnulli.us wrote: >From: Jiri Pirko > >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. We found one small change is

[patch net-next] mlxsw: core: Use devm_kzalloc to allocate mlxsw_hwmon structure

2015-12-21 Thread Jiri Pirko
From: Jiri Pirko 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: Ido Schimmel Fixes: 89309da39 ("mlxsw: core: Implement