block/iscsi: validate block size returned from target
commit6d1f252d8c1ba73bf6ed9af28731a9c9c3d473a2
authorPeter Lieven <pl@kamp.de>
Fri, 14 Aug 2015 11:33:36 +0000 (14 13:33 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Sep 2015 16:14:03 +0000 (7 18:14 +0200)
treeb8a3b659416a998c29ea63713eb181c65dc19873
parentf3926945c85689e8af324c0db0b39be771dbbebb
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>
block/iscsi.c