Re: [PATCH] clk: s2mps11: Fix double free corruption during driver unbind

2014-06-27 Thread Krzysztof Kozlowski
On piÄ…, 2014-06-27 at 17:19 +0530, Yadwinder Singh Brar wrote: > Hi Krzystof, > > On Fri, Jun 27, 2014 at 4:04 PM, Krzysztof Kozlowski > wrote: > > After unbinding the driver memory was corrupted by double free of > > clk_lookup structure. This lead to OOPS when re-binding the driver > > again. >

Re: [PATCH] clk: s2mps11: Fix double free corruption during driver unbind

2014-06-27 Thread Yadwinder Singh Brar
Hi Krzystof, On Fri, Jun 27, 2014 at 4:04 PM, Krzysztof Kozlowski wrote: > After unbinding the driver memory was corrupted by double free of > clk_lookup structure. This lead to OOPS when re-binding the driver > again. > > The driver allocated memory for 'clk_lookup' with devm_kzalloc. During > d

[PATCH] clk: s2mps11: Fix double free corruption during driver unbind

2014-06-27 Thread Krzysztof Kozlowski
After unbinding the driver memory was corrupted by double free of clk_lookup structure. This lead to OOPS when re-binding the driver again. The driver allocated memory for 'clk_lookup' with devm_kzalloc. During driver removal this memory was freed twice: once by clkdev_drop() and second by devm co