block/iscsi: validate block size returned from target
commit2ac9fa162e25019eaa548f1fadfee256af88ca0f
authorPeter Lieven <pl@kamp.de>
Fri, 14 Aug 2015 11:33:36 +0000 (14 13:33 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sat, 17 Oct 2015 23:14:37 +0000 (17 18:14 -0500)
treeb2387961d986ff31f99114518c65aec15dcfa457
parent5b7d840e741aa06751b0fcec02ccda50a6bd574d
block/iscsi: validate block size returned from target

It has been reported that at least tgtd returns a block size of 0
for LUN 0. To avoid running into divide by zero later on and protect
against other problematic block sizes validate the block size right
at connection time.

Cc: qemu-stable@nongnu.org
Reported-by: Andrey Korolyov <andrey@xdel.ru>
Signed-off-by: Peter Lieven <pl@kamp.de>
Message-Id: <1439552016-8557-1-git-send-email-pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 6d1f252d8c1ba73bf6ed9af28731a9c9c3d473a2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/iscsi.c