]> git.baikalelectronics.ru Git - kernel.git/commit
iscsi-target: Change BUG_ON to REJECT in iscsit_process_nop_out
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 1 May 2014 20:44:56 +0000 (13:44 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 16 May 2014 00:09:11 +0000 (17:09 -0700)
commit14a228242f41522baeefd22d829336a7a84ee121
tree395eb47a69b0dcebf0354bc9f9a6767f71085027
parente772e54bc40339d5ac1a142f9f24ba5ece0c2bc2
iscsi-target: Change BUG_ON to REJECT in iscsit_process_nop_out

This patch changes an incorrect use of BUG_ON to instead generate a
REJECT + PROTOCOL_ERROR in iscsit_process_nop_out() code.  This case
can occur with traditional TCP where a flood of zeros in the data
stream can reach this block for what is presumed to be a NOP-OUT with
a solicited reply, but without a valid iscsi_cmd pointer.

This incorrect BUG_ON was introduced during the v3.11-rc timeframe
with the following commit:

commit 180b0df8964652971b7b71c30f532840bdcab9d3
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Fri Jun 14 16:07:47 2013 -0700

    iscsi/isert-target: Refactor ISCSI_OP_NOOP RX handling

Reported-by: Arshad Hussain <arshad.hussain@calsoftinc.com>
Cc: stable@vger.kernel.org # 3.11+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/iscsi/iscsi_target.c