Re: gigaset: freeing an active object

From: Tilman Schmidt
Date: Sun Nov 29 2015 - 13:39:10 EST


Am 29.11.2015 um 19:22 schrieb Peter Hurley:
> On 11/29/2015 10:30 AM, Tilman Schmidt wrote:
>>
>> Judging from the backtrace below this must be the call
>>
>> kfree(cs->hw.ser);
>>
>> in drivers/isdn/gigaset/ser-gigaset.c line 375.
>> cs->hw.ser is of type struct ser_cardstate *.
>> struct ser_cardstate consists of a struct platform_device, a struct
>> completion, an atomic_t and a pointer. No timer_list.
[...]
>
> The platform_device embedded in struct ser_cardstate hasn't been released when
> you kfree() the memory it's in.

How so? The kfree() call quoted above is immediately preceded by:

platform_device_unregister(&cs->hw.ser->dev);

Thanks,
Tilman

--
Tilman Schmidt E-Mail: tilman@xxxxxxx
Bonn, Germany
Nous, on a des fleurs et des bougies pour nous protÃger.

Attachment: signature.asc
Description: OpenPGP digital signature