lkml.org 
[lkml]   [2004]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 2.6.10-rc1 4/5] driver-model: kobject_add() error path reference counting fix
     df_04_kobject_add_ref_fix.patch

    In kobject_add(), @kobj wasn't put'd properly on error path. This
    patch fixes it.


    Signed-off-by: Tejun Heo <tj@home-tj.org>


    Index: linux-export/lib/kobject.c
    ===================================================================
    --- linux-export.orig/lib/kobject.c 2004-11-04 10:25:58.000000000 +0900
    +++ linux-export/lib/kobject.c 2004-11-04 11:04:14.000000000 +0900
    @@ -183,6 +183,7 @@ int kobject_add(struct kobject * kobj)
    unlink(kobj);
    if (parent)
    kobject_put(parent);
    + kobject_put(kobj);
    } else {
    kobject_hotplug(kobj, KOBJ_ADD);
    }
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.066 / U:0.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site