lkml.org 
[lkml]   [2008]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subjectpatch driver-core-fix-cleanup-in-device_create_vargs.patch added to gregkh-2.6 tree
    From
    Date

    This is a note to let you know that I've just added the patch titled

    Subject: Driver core: Fix cleanup in device_create_vargs().

    to my gregkh-2.6 tree. Its filename is

    driver-core-fix-cleanup-in-device_create_vargs.patch

    This tree can be found at
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


    From cornelia.huck@de.ibm.com Thu Sep 11 02:38:46 2008
    From: Cornelia Huck <cornelia.huck@de.ibm.com>
    Date: Wed, 3 Sep 2008 18:26:41 +0200
    Subject: Driver core: Fix cleanup in device_create_vargs().
    To: Greg K-H <greg@kroah.com>
    Cc: linux-kernel <linux-kernel@vger.kernel.org>
    Message-ID: <20080903182641.75db23a6@gondolin.boeblingen.de.ibm.com>

    From: Cornelia Huck <cornelia.huck@de.ibm.com>

    If device_register() in device_create_vargs() fails, the device
    must be cleaned up with put_device() (which is also fine on NULL)
    instead of kfree().

    Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    Cc: stable <stable@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/base/core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/base/core.c
    +++ b/drivers/base/core.c
    @@ -1256,7 +1256,7 @@ struct device *device_create_vargs(struc
    return dev;

    error:
    - kfree(dev);
    + put_device(dev);
    return ERR_PTR(retval);
    }
    EXPORT_SYMBOL_GPL(device_create_vargs);

    Patches currently in gregkh-2.6 which might be from cornelia.huck@de.ibm.com are

    driver-core/s390-bus_id-dev_name-conversions.patch
    driver-core/driver-core-clarify-device-cleanup.patch
    driver-core/driver-core-fix-cleanup-in-device_create_vargs.patch
    driver-core/s390-bus_id-dev_set_name-changes.patch
    driver-core/s390-more-bus_id-dev_name-conversions.patch
    driver-core/s390-use-s390_root_dev_-in-kvm_virtio.patch
    driver-core/s390-bus_id-dev_set_name-for-css-and-ccw-busses.patch
    driver-core/driver-core-provide-a-dev_set_name-that-handles-names-longer-than-20-chars.patch


    \
     
     \ /
      Last update: 2008-09-11 12:17    [W:0.022 / U:63.236 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site