From: Nicholas Bellinger Date: Thu, 31 Jan 2013 23:05:48 +0000 (-0800) Subject: target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices X-Git-Tag: v3.8-rc7~24^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a3cf6ca1ab2a2f7161c6dec5a787fc7a5de864e;p=pandora-kernel.git target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices This patch fixes a possible divide by zero bug when the fabric_max_sectors device attribute is written and backend se_device failed to be successfully configured -> enabled. Go ahead and use block_size=512 within se_dev_set_fabric_max_sectors() in the event of a target_configure_device() failure case, as no valid dev->dev_attrib.block_size value will have been setup yet. Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed