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

2015-12-22 Thread David Miller
From: Jiri Pirko Date: Tue, 22 Dec 2015 09:43:07 +0100 > 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. > >

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

2015-12-22 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