qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] vhost-user: avoid g_return_val_if() in get/set_config()
@ 2020-11-18  9:16 Stefan Hajnoczi
  2020-11-18  9:16 ` [PATCH 1/4] contrib/vhost-user-blk: avoid g_return_val_if() input validation Stefan Hajnoczi
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2020-11-18  9:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Michael S. Tsirkin, Coiby Xu,
	Raphael Norwitz, Gerd Hoffmann, Stefan Hajnoczi,
	Marc-André Lureau, Max Reitz

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    | 4 +++-
 contrib/vhost-user-blk/vhost-user-blk.c | 4 +++-
 contrib/vhost-user-gpu/vhost-user-gpu.c | 4 +++-
 contrib/vhost-user-input/main.c         | 4 +++-
 4 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.28.0


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

end of thread, other threads:[~2020-12-02 15:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18  9:16 [PATCH 0/4] vhost-user: avoid g_return_val_if() in get/set_config() Stefan Hajnoczi
2020-11-18  9:16 ` [PATCH 1/4] contrib/vhost-user-blk: avoid g_return_val_if() input validation Stefan Hajnoczi
2020-11-18  9:16 ` [PATCH 2/4] contrib/vhost-user-gpu: " Stefan Hajnoczi
2020-11-18  9:16 ` [PATCH 3/4] contrib/vhost-user-input: " Stefan Hajnoczi
2020-11-18  9:16 ` [PATCH 4/4] block/export: " Stefan Hajnoczi
2020-11-18 15:21 ` [PATCH 0/4] vhost-user: avoid g_return_val_if() in get/set_config() Marc-André Lureau
2020-11-18 16:27   ` Markus Armbruster
2020-12-02 15:09   ` Stefan Hajnoczi
2020-11-18 16:28 ` Markus Armbruster
2020-11-23 11:20 ` Stefano Garzarella

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