linux/drivers/target
Nicholas Bellinger bdfb333556 target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices
commit 7a3cf6ca1a upstream

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.

Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-28 06:59:03 -08:00
..
iscsi iscsit: use GFP_ATOMIC under spin lock 2013-01-17 08:50:44 -08:00
loopback loopback: Fix transport_generic_allocate_tasks error handling 2012-03-17 18:07:27 -07:00
tcm_fc tcm_fc: Do not report target role when target is not defined 2013-01-21 11:45:14 -08:00
Kconfig iscsi-target: Add iSCSI fabric support for target v4.1 2011-07-26 09:16:43 +00:00
Makefile target: remove the ->transport_split_cdb callback in se_cmd 2011-10-24 03:21:15 +00:00
target_core_alua.c target: Return error to initiator if SET TARGET PORT GROUPS emulation fails 2012-06-22 11:37:17 -07:00
target_core_alua.h target: pass the se_task to the CDB emulation callback 2011-11-04 08:00:17 +00:00
target_core_cdb.c target: Check number of unmap descriptors against our limit 2012-08-15 08:10:32 -07:00
target_core_configfs.c target: Don't return success from module_init() if setup fails 2012-11-17 13:15:55 -08:00
target_core_device.c target: Fix divide by zero bug in fabric_max_sectors for unconfigured devices 2013-02-28 06:59:03 -08:00
target_core_fabric_configfs.c target: fix regression with dev_link_magic in target_fabric_port_link 2013-02-03 18:24:42 -06:00
target_core_fabric_lib.c target: remove useless casts 2011-12-14 11:28:07 +00:00
target_core_file.c target: Fix bug in handling of FILEIO + block_device resize ops 2012-05-17 12:02:43 -07:00
target_core_file.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_hba.c target: header reshuffle, part2 2011-12-14 11:26:05 +00:00
target_core_iblock.c target: increase iblock task sizes 2012-02-25 14:37:46 -08:00
target_core_iblock.h target: increase iblock task sizes 2012-02-25 14:37:46 -08:00
target_core_internal.h target: Untangle front-end and back-end meanings of max_sectors attribute 2012-02-25 14:37:49 -08:00
target_core_pr.c target: Clean up returning errors in PR handling code 2012-07-29 08:04:18 -07:00
target_core_pr.h target: Move core_scsi3_check_cdb_abort_and_preempt 2011-12-14 11:27:34 +00:00
target_core_pscsi.c target/pscsi: fix PHV_VIRUTAL_HOST_ID typo 2012-02-25 14:37:50 -08:00
target_core_pscsi.h target/pscsi: fix PHV_VIRUTAL_HOST_ID typo 2012-02-25 14:37:50 -08:00
target_core_rd.c target: use \n as a separator for configuration 2011-12-14 11:27:23 +00:00
target_core_rd.h target: make the ->get_cdb method optional 2011-10-24 03:21:11 +00:00
target_core_stat.c target: remove obvious warnings 2012-03-15 19:16:09 -07:00
target_core_tmr.c target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path 2012-11-17 13:15:55 -08:00
target_core_tpg.c target: Add link_magic for fabric allow_link destination target_items 2013-01-21 11:45:24 -08:00
target_core_transport.c target: Add link_magic for fabric allow_link destination target_items 2013-01-21 11:45:24 -08:00
target_core_ua.c target: Use array_zalloc for device_list 2012-03-15 19:15:51 -07:00
target_core_ua.h [SCSI] target: Add LIO target core v4.0.0-rc6 2011-01-14 10:12:29 -06:00