target: Fix VERIFY_16 handling in sbc_parse_cdb
authorMax Lohrmann <post@wickenrode.com>
Wed, 8 Mar 2017 06:09:56 +0000 (22:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Mar 2017 10:13:19 +0000 (12:13 +0200)
commitd267ecbdfdb4199c0e3a967ecc17a6b80d95209a
treef69b173a25c77c29a0564f96fa22acf0a6329613
parent246760c61d9c4c0114ba5bd324df4ae17468e238
target: Fix VERIFY_16 handling in sbc_parse_cdb

commit 13603685c1f12c67a7a2427f00b63f39a2b6f7c9 upstream.

As reported by Max, the Windows 2008 R2 chkdsk utility expects
VERIFY_16 to be supported, and does not handle the returned
CHECK_CONDITION properly, resulting in an infinite loop.

The kernel will log huge amounts of this error:

kernel: TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x8f, sending
CHECK_CONDITION.

Signed-off-by: Max Lohrmann <post@wickenrode.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_sbc.c