target: Check for LBA + sectors wrap-around in sbc_parse_cdb
commitaa179935edea9a64dec4b757090c8106a3907ffa
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 13 Feb 2015 22:27:40 +0000 (13 22:27 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 14 Feb 2015 02:09:44 +0000 (14 02:09 +0000)
tree57898482d3a5c86e00db5b23f1b4057e4376c597
parent8e575c50a171f2579e367a7f778f86477dfdaf49
target: Check for LBA + sectors wrap-around in sbc_parse_cdb

This patch adds a check to sbc_parse_cdb() in order to detect when
an LBA + sector vs. end-of-device calculation wraps when the LBA is
sufficently large enough (eg: 0xFFFFFFFFFFFFFFFF).

Cc: Martin Petersen <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_sbc.c