nbd: fix crash when the blksize is zero
authorXiubo Li <xiubli@redhat.com>
Wed, 29 May 2019 20:16:05 +0000 (15:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:21:26 +0000 (18:21 +0200)
commitc688982ffaeb71cbf0c6a16a232d037baf21e472
tree6d81621cb44a72e9d6022ee0af449f02669b6f32
parent63bb8b76ed62e4075a6bd805132fd9647b0c0e47
nbd: fix crash when the blksize is zero

[ Upstream commit 553768d1169a48c0cd87c4eb4ab57534ee663415 ]

This will allow the blksize to be set zero and then use 1024 as
default.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
[fix to use goto out instead of return in genl_connect]
Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/nbd.c