From: <gregkh@suse.de>
To: cornelia.huck@de.ibm.com, gregkh@suse.de, greg@kroah.com,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: patch driver-core-fix-cleanup-in-device_create_vargs.patch added to gregkh-2.6 tree
Date: Thu, 11 Sep 2008 03:11:45 -0700 [thread overview]
Message-ID: <12211279052027@kroah.org> (raw)
In-Reply-To: <20080903182641.75db23a6@gondolin.boeblingen.de.ibm.com>
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
prev parent reply other threads:[~2008-09-11 10:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080903162808.36bb2405@gondolin.boeblingen.de.ibm.com>
2008-09-03 16:26 ` [Patch 1/2] Driver core: Clarify device cleanup Cornelia Huck
2008-09-03 16:26 ` [Patch 2/2] Driver core: Fix cleanup in device_create_vargs() Cornelia Huck
2008-09-11 10:11 ` gregkh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12211279052027@kroah.org \
--to=gregkh@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.