[lkml]   [2009]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: kobjects: mark cleaned up kobjects as unitialized
    On Wed, Nov 25, 2009 at 11:27:58AM +0200, eran liberty wrote:
    > Hi Greg & Balaji,
    > After diving into the LDKM and failed to spot the point where you
    > actually un-initialize the 'state_initialized' of a kobject... and
    > since I have statically allocated object which trip over this very
    > same trap...

    Ah, there's your problem, don't statically allocate a kobject. Fix that
    and your issue goes away, right?

    > Google-ing for others who fell into this trap, I found your thread/patch at:
    > and
    > I noticed this patch did not make it into the mainline.
    > Is this patch still valid?
    > Is there some other, better way to do it by the book?

    Do not statically allocate a kobject.

    > Right now I by-pass the problem by memset-ing the whole object after I
    > release it... but I feel this is a bit brutal.

    You should be freeing your memory in your release function.

    Do you have a pointer to your code somewhere?


    greg k-h

     \ /
      Last update: 2009-11-25 13:47    [W:0.019 / U:11.636 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site