From: weiping zhang <zwp10758@gmail.com>
To: cohuck@redhat.com, mst@redhat.com, jasowang@redhat.com
Cc: virtualization@lists.linux-foundation.org
Subject: [PATCH v3 0/5] proper cleanup if fail to register_virtio_device
Date: Sun, 17 Dec 2017 21:45:21 +0800 [thread overview]
Message-ID: <cover.1513517240.git.zhangweiping@didichuxing.com> (raw)
Hi,
Patch1 add a helper to get virtio_device's status which will be used
later.
Patch2~4: check virtio_device's status is RTIO_CONFIG_S_ACKNOWLEDGE
or not, if so use put_device otherwise use kfree.
Patch5: add comments for virtio_register_device help caller do a
proper cleanup if got failure.
weiping zhang (5):
virtio: add helper virtio_get_status
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
virtio: add comments for virtio_register_device
drivers/misc/mic/vop/vop_main.c | 17 +++++++++++------
drivers/remoteproc/remoteproc_virtio.c | 10 +++++++++-
drivers/virtio/virtio.c | 19 +++++++++++++++++++
drivers/virtio/virtio_pci_common.c | 5 ++++-
include/linux/virtio_config.h | 2 ++
5 files changed, 45 insertions(+), 8 deletions(-)
--
2.9.4
next reply other threads:[~2017-12-17 13:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 13:45 weiping zhang [this message]
2017-12-17 13:45 ` [PATCH v3 1/5] virtio: add helper virtio_get_status weiping zhang
2017-12-17 13:46 ` [PATCH v3 2/5] virtio_pci: don't kfree device on register failure weiping zhang
2017-12-17 13:47 ` [PATCH v3 3/5] virtio_vop: " weiping zhang
2017-12-17 13:47 ` [PATCH v3 4/5] virtio_remoteproc: " weiping zhang
2017-12-17 13:48 ` [PATCH v3 5/5] virtio: add comments for virtio_register_device weiping zhang
2017-12-19 11:11 ` Cornelia Huck
2017-12-19 15:23 ` 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.1513517240.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