Skip to content

proper cleanup if fail to register_virtio_device

weiping zhang virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest5 patches 2 repliesIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5virtio: add helper virtio_get_statusdrivers/virtio/virtio.c include/linux/virtio_config.h+8 -00 replies
2/5virtio_pci: don't kfree device on register failuredrivers/virtio/virtio_pci_common.c+4 -10 replies
3/5virtio_vop: don't kfree device on register failuredrivers/misc/mic/vop/vop_main.c+11 -60 replies
4/5virtio_remoteproc: don't kfree device on register failuredrivers/remoteproc/remoteproc_virtio.c+9 -10 replies
5/5virtio: add comments for virtio_register_devicedrivers/virtio/virtio.c+13 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/5] proper cleanup if fail to register_virtio_device

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(-)
Signature · 1 line
2.9.4