Skip to content
Commit 871c433b authored by Rustam Kovhaev's avatar Rustam Kovhaev Committed by Paolo Bonzini
Browse files

KVM: use struct_size() and flex_array_size() helpers in kvm_io_bus_unregister_dev()



Make use of the struct_size() helper to avoid any potential type
mistakes and protect against potential integer overflows
Make use of the flex_array_size() helper to calculate the size of a
flexible array member within an enclosing structure

Suggested-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarRustam Kovhaev <rkovhaev@gmail.com>
Message-Id: <20200918120500.954436-1-rkovhaev@gmail.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 4407a797
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment