target: Check for LBA + sectors wrap-around in sbc_parse_cdb
authorNicholas Bellinger <nab@linux-iscsi.org>
Fri, 13 Feb 2015 22:27:40 +0000 (22:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:22:28 +0000 (13:22 +0100)
commit84ba11a6ee549b2727a3b83d3c1b455df1c7ebcd
treea6353a6f41a7ae27bc69f0f23a8fdf3e5f075051
parent9113c468b621ddb74f2395564720862faa3a083d
target: Check for LBA + sectors wrap-around in sbc_parse_cdb

commit aa179935edea9a64dec4b757090c8106a3907ffa upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_sbc.c