Skip to content

vhost-user: avoid g_return_val_if() in get/set_config()

Stefan Hajnoczi qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 13 repliesIn review
  2. v14 patches 5 repliesSuperseded

Changes in v2 from the cover letter

* Print errors [Marc-André]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4contrib/vhost-user-blk: avoid g_return_val_if() input validationcontrib/vhost-user-blk/vhost-user-blk.c+5 -13 replies
2/4contrib/vhost-user-gpu: avoid g_return_val_if() input validationcontrib/vhost-user-gpu/vhost-user-gpu.c+5 -14 replies
3/4contrib/vhost-user-input: avoid g_return_val_if() input validationcontrib/vhost-user-input/main.c+5 -12 replies
4/4block/export: avoid g_return_val_if() input validationblock/export/vhost-user-blk-server.c+5 -12 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc-André LureauRaphael NorwitzPhilippe Mathieu-DaudéStefano Garzarella
SeriesR-b
1/4R-b R-b R-b
2/4R-b
3/4R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] vhost-user: avoid g_return_val_if() in get/set_config()

v2:
* Print errors [Marc-André]

Markus Armbruster pointed out that g_return_val_if() is meant for programming errors. It must not be used for input validation since it can be compiled out. Use explicit if statements instead.

This patch series converts vhost-user device backends that use g_return_val_if() in get/set_config().

Stefan Hajnoczi (4):
contrib/vhost-user-blk: avoid g_return_val_if() input validation contrib/vhost-user-gpu: avoid g_return_val_if() input validation contrib/vhost-user-input: avoid g_return_val_if() input validation block/export: avoid g_return_val_if() input validation

 block/export/vhost-user-blk-server.c    | 6 +++++-
 contrib/vhost-user-blk/vhost-user-blk.c | 6 +++++-
 contrib/vhost-user-gpu/vhost-user-gpu.c | 6 +++++-
 contrib/vhost-user-input/main.c         | 6 +++++-
 4 files changed, 20 insertions(+), 4 deletions(-)
Signature · 1 line
2.28.0