From: weiping zhang <zwp10758@gmail.com>
To: cohuck@redhat.com, mst@redhat.com, jasowang@redhat.com
Cc: virtualization@lists.linux-foundation.org
Subject: [PATCH v4 0/4] use put_device to cleanup resource
Date: Wed, 20 Dec 2017 12:26:10 +0800 [thread overview]
Message-ID: <cover.1513700444.git.zhangweiping@didichuxing.com> (raw)
Hi,
The main change is split device_register into 2 sperate calls:
device_initalize() and device_add, and then the caller can use
put_device safety when fail to register_virtio_device.
v3->v4:
* split device_register into device_initialize and devicea_add that
the caller can always use put_device when fail to register virtio
device.
v2->v3:
* virtio: add new helper do get device's status then determine use
put_device or kfree.
v1->v2:
* virtio_pci: add comments in commit message for why using put_device
* virtio_vop: also use put_device int _vop_remove_device
weiping zhang (4):
virtio: split device_register into device_initialize and device_add
virtio_pci: don't kfree device on register failure
virtio_vop: don't kfree device on register failure
virtio_remoteproc: don't kfree device on register failure
drivers/misc/mic/vop/vop_main.c | 20 +++++++++++++-------
drivers/remoteproc/remoteproc_virtio.c | 13 +++++++++++--
drivers/virtio/virtio.c | 18 +++++++++++++++---
drivers/virtio/virtio_pci_common.c | 8 ++++++--
4 files changed, 45 insertions(+), 14 deletions(-)
--
2.9.4
next reply other threads:[~2017-12-20 4:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 4:26 weiping zhang [this message]
2017-12-20 4:26 ` [PATCH v4 1/4] virtio: split device_register into device_initialize and device_add weiping zhang
2017-12-20 15:53 ` Cornelia Huck
2017-12-21 2:37 ` weiping zhang
2017-12-21 2:43 ` weiping zhang
2017-12-20 4:26 ` [PATCH v4 2/4] virtio_pci: don't kfree device on register failure weiping zhang
2017-12-20 15:55 ` Cornelia Huck
2017-12-20 4:27 ` [PATCH v4 3/4] virtio_vop: " weiping zhang
2017-12-20 15:57 ` Cornelia Huck
2017-12-20 4:27 ` [PATCH v4 4/4] virtio_remoteproc: " weiping zhang
2017-12-20 16:12 ` Cornelia Huck
2017-12-21 3:08 ` weiping zhang
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=cover.1513700444.git.zhangweiping@didichuxing.com \
--to=zwp10758@gmail.com \
--cc=cohuck@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).