All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] vhost-user: avoid g_return_val_if() in get/set_config()
@ 2020-12-02 15:26 Stefan Hajnoczi
  2020-12-02 15:26 ` [PATCH v2 1/4] contrib/vhost-user-blk: avoid g_return_val_if() input validation Stefan Hajnoczi
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Stefan Hajnoczi @ 2020-12-02 15:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, Markus Armbruster,
	Coiby Xu, Raphael Norwitz, Marc-André Lureau, Gerd Hoffmann,
	Stefan Hajnoczi, Marc-André Lureau, Max Reitz,
	Stefano Garzarella

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(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-12-10  8:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 15:26 [PATCH v2 0/4] vhost-user: avoid g_return_val_if() in get/set_config() Stefan Hajnoczi
2020-12-02 15:26 ` [PATCH v2 1/4] contrib/vhost-user-blk: avoid g_return_val_if() input validation Stefan Hajnoczi
2020-12-02 15:49   ` Marc-André Lureau
2020-12-02 15:54   ` Raphael Norwitz
2020-12-02 15:55   ` Philippe Mathieu-Daudé
2020-12-02 15:26 ` [PATCH v2 2/4] contrib/vhost-user-gpu: " Stefan Hajnoczi
2020-12-02 15:50   ` Marc-André Lureau
2020-12-03  9:51     ` Stefan Hajnoczi
2020-12-03 10:26       ` Marc-André Lureau
2020-12-03 11:37         ` Stefan Hajnoczi
2020-12-02 15:26 ` [PATCH v2 3/4] contrib/vhost-user-input: " Stefan Hajnoczi
2020-12-02 15:51   ` Marc-André Lureau
2020-12-03  9:52     ` Stefan Hajnoczi
2020-12-02 15:26 ` [PATCH v2 4/4] block/export: " Stefan Hajnoczi
2020-12-02 15:52   ` Marc-André Lureau
2020-12-02 15:58   ` Philippe Mathieu-Daudé
2020-12-03 13:41 ` [PATCH v2 0/4] vhost-user: avoid g_return_val_if() in get/set_config() Stefano Garzarella
2020-12-10  8:29   ` Marc-André Lureau

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.