Skip to content

Commit

Permalink
vhost: make msg padding explicit
Browse files Browse the repository at this point in the history
There's a 32 bit hole just after type. It's best to
give it a name, this way compiler is forced to initialize
it with rest of the structure.

Reported-by: Kevin Easton <kevin@guarana.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed May 1, 2018
1 parent bf2acc9 commit de08481
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/uapi/linux/vhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct vhost_iotlb_msg {

struct vhost_msg {
int type;
int padding0;
union {
struct vhost_iotlb_msg iotlb;
__u8 padding[64];
Expand Down

0 comments on commit de08481

Please sign in to comment.