Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/iscsi Add sanity check.



details:   https://anonhg.NetBSD.org/src/rev/79ca32e962fd
branches:  trunk
changeset: 320887:79ca32e962fd
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Mar 04 07:37:43 2018 +0000

description:
Add sanity check.

diffstat:

 sys/dev/iscsi/iscsi_rcv.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r da0fbe56a3f8 -r 79ca32e962fd sys/dev/iscsi/iscsi_rcv.c
--- a/sys/dev/iscsi/iscsi_rcv.c Sun Mar 04 07:15:37 2018 +0000
+++ b/sys/dev/iscsi/iscsi_rcv.c Sun Mar 04 07:37:43 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsi_rcv.c,v 1.24 2017/12/03 19:07:10 christos Exp $  */
+/*     $NetBSD: iscsi_rcv.c,v 1.25 2018/03/04 07:37:43 mlelstv Exp $   */
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -737,6 +737,11 @@
                return -1;
        }
 
+       if (req_ccb->ccb_flags & CCBF_COMPLETE) {
+               DEBOUT(("Possibly duplicate command response (tagged as COMPLETE)\n"));
+               return -1;
+       }
+
        if (req_ccb->ccb_pdu_waiting != NULL) {
                ccb_timeout_start(req_ccb, COMMAND_TIMEOUT);
                req_ccb->ccb_num_timeouts = 0;



Home | Main Index | Thread Index | Old Index