diff options
author | Minfei Huang <mnghuan@gmail.com> | 2016-08-09 10:39:20 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-08-09 12:42:39 +0200 |
commit | 347a529398e8e723338cca5d8a8ae2d9e7e93448 (patch) | |
tree | 3dcf003ea2d1c35c342fbd93d9342a4014f25f2c /tools/scripts | |
parent | virtio-vsock: fix include guard typo (diff) | |
download | linux-347a529398e8e723338cca5d8a8ae2d9e7e93448.tar.xz linux-347a529398e8e723338cca5d8a8ae2d9e7e93448.zip |
virtio_blk: Fix a slient kernel panic
We do a lot of memory allocation in function init_vq, and don't handle
the allocation failure properly. Then this function will return 0,
although initialization fails due to lacking memory. At that moment,
kernel will panic in guest machine, if virtio is used to drive disk.
To fix this bug, we should take care of allocation failure, and return
correct value to let caller know what happen.
Tested-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
Signed-off-by: Minfei Huang <minfei.hmf@alibaba-inc.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/scripts')
0 files changed, 0 insertions, 0 deletions