lkml.org 
[lkml]   [2015]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: gigaset: freeing an active object
    From
    Date
    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@imap.cc
    Bonn, Germany
    Nous, on a des fleurs et des bougies pour nous protéger.

    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2015-11-29 20:01    [W:3.247 / U:0.548 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site