diff options
author | Mark Brown <broonie@kernel.org> | 2018-06-27 14:34:10 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-27 14:34:10 +0100 |
commit | eed41b9f413f40183095d27ffc94fb942fe18bb6 (patch) | |
tree | 0a28112db2410e9ae7586343895079d470121599 /drivers/vhost/vhost.c | |
parent | 698f8bc0bacea1351db9de6f247e6922fb4d7f80 (diff) | |
parent | 1ce34dea91ae86bb18f493f72292df1bf6f66df7 (diff) |
Merge branch 'linux-linaro-lsk-v4.14' into linux-linaro-lsk-v4.14-rtlsk-v4.14-18.06-rt
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 50e48afd88ff..244e5256c526 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2382,6 +2382,9 @@ struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type) struct vhost_msg_node *node = kmalloc(sizeof *node, GFP_KERNEL); if (!node) return NULL; + + /* Make sure all padding within the structure is initialized. */ + memset(&node->msg, 0, sizeof node->msg); node->vq = vq; node->msg.type = type; return node; |