summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_util.c
diff options
context:
space:
mode:
authorRoland Dreier2012-10-31 17:16:45 +0100
committerNicholas Bellinger2012-11-01 08:38:44 +0100
commit3e03989b5868acf69a391a424dc71fcd6cc48167 (patch)
treec187fcbe2d9861d10e9256725990f266da1f246d /drivers/target/iscsi/iscsi_target_util.c
parenttarget: Don't return success from module_init() if setup fails (diff)
downloadkernel-qcow2-linux-3e03989b5868acf69a391a424dc71fcd6cc48167.tar.gz
kernel-qcow2-linux-3e03989b5868acf69a391a424dc71fcd6cc48167.tar.xz
kernel-qcow2-linux-3e03989b5868acf69a391a424dc71fcd6cc48167.zip
target: Avoid integer overflow in se_dev_align_max_sectors()
The expression (max_sectors * block_size) might overflow a u32 (indeed, since iblock sets max_hw_sectors to UINT_MAX, it is guaranteed to overflow and end up with a much-too-small result in many common cases). Fix this by doing an equivalent calculation that doesn't require multiplication. While we're touching this code, avoid splitting a printk format across two lines and use pr_info(...) instead of printk(KERN_INFO ...). Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_util.c')
0 files changed, 0 insertions, 0 deletions