summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMinfei Huang <mnghuan@gmail.com>2016-08-09 16:39:20 +0800
committerMichael S. Tsirkin <mst@redhat.com>2016-08-09 13:42:39 +0300
commit347a529398e8e723338cca5d8a8ae2d9e7e93448 (patch)
tree3dcf003ea2d1c35c342fbd93d9342a4014f25f2c /drivers/s390
parent28ad55578b8a76390d966b09da8c7fa3644f5140 (diff)
downloadlinux-347a529398e8e723338cca5d8a8ae2d9e7e93448.tar.bz2
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 'drivers/s390')
0 files changed, 0 insertions, 0 deletions