Re: [PATCH -next] power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()

2021-04-08 Thread Sebastian Reichel
Hi, On Wed, Apr 07, 2021 at 01:15:11PM +0200, Krzysztof Kozlowski wrote: > On 07/04/2021 11:19, Yang Yingliang wrote: > > This driver's remove path calls cancel_delayed_work(). However, that > > function does not wait until the work function finishes. This means > > that the callback function may

Re: [PATCH -next] power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()

2021-04-07 Thread Krzysztof Kozlowski
On 07/04/2021 11:19, Yang Yingliang wrote: > This driver's remove path calls cancel_delayed_work(). However, that > function does not wait until the work function finishes. This means > that the callback function may still be running after the driver's > remove function has finished, which would

[PATCH -next] power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()

2021-04-07 Thread Yang Yingliang
This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling