]> Git Repo - qemu.git/commit
libvhost-user: add vmsg_set_reply_u64() helper
authorStefan Hajnoczi <[email protected]>
Wed, 26 Jun 2019 07:48:12 +0000 (08:48 +0100)
committerMichael S. Tsirkin <[email protected]>
Thu, 4 Jul 2019 21:00:32 +0000 (17:00 -0400)
commitdb68f4ff06cbe0517ed0d9b5634f6cddaed2547c
tree09127383fdd8160bb275cd2594fb8e6e17bdfb34
parent457cfcccdd107a968d106934df63b836b5dd743e
libvhost-user: add vmsg_set_reply_u64() helper

The VhostUserMsg request is reused as the reply by message processing
functions.  This is risky since request fields may corrupt the reply if
the vhost-user message handler function forgets to re-initialize them.

Changing this practice would be very invasive but we can introduce a
helper function to make u64 payload replies safe.  This also eliminates
code duplication in message processing functions.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
Message-Id: <20190626074815[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
contrib/libvhost-user/libvhost-user.c
This page took 0.025609 seconds and 4 git commands to generate.