[lkml]   [2008]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: on static kobjects and double frees...
    Hi Doug, ...

    On Tue, Jun 10, 2008 at 02:14:30PM -0700, Doug Thompson wrote:
    > [...]
    > Arthur, thanks for tracking that down and reviewing it. All the memory controller kobjects are all
    > dynamic. [...]

    You're welcome, I learned a lot about kobjects
    that I should have already known...

    AFAICS, mc is not quite clean yet, though, as
    mc_kset is static and I don't think that is right.
    It does, however, look like less work than edac_pci_sysfs.c...

    > [...] The edac PCI code needed to be refactored and it looks like you did it.

    I only did the bare minimum, there's a lot of kobject
    stuff in there that looks suspect to me, e.g.:

    * the "pci" object should be a kset rather than a kobject?
    * if the "pci" object is a kset, can the whole global list
    thing in edac_pci just go away?
    * do we really need the atomic_inc counter, wouldn't a mutex
    be clearer?
    * can we initialize "pci" at init time thereby removing the
    need even for a mutex on the "pci" initializer? This does
    change the sysfs semantics slightly, though, as the "pci"
    object would no longer be created lazily. I'm not sure if
    that's a problem.

    and other minor things. It looks to me like it could
    use a thorough scrubbing. The good news is that I don't
    think the API would change much if at all. I can have a
    closer look if you are interested...


     \ /
      Last update: 2008-06-10 23:41    [W:0.022 / U:39.600 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site