Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Don't loop infinitely if the output pointer was c...



details:   https://anonhg.NetBSD.org/src/rev/c50a796f486f
branches:  trunk
changeset: 352034:c50a796f486f
user:      maya <maya%NetBSD.org@localhost>
date:      Sat Mar 11 12:08:57 2017 +0000

description:
Don't loop infinitely if the output pointer was changed
Untested, but the change done seems to match the comment above it

CID 980321

diffstat:

 sys/dev/ic/isp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1e16b710d0ec -r c50a796f486f sys/dev/ic/isp.c
--- a/sys/dev/ic/isp.c  Sat Mar 11 10:33:46 2017 +0000
+++ b/sys/dev/ic/isp.c  Sat Mar 11 12:08:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.125 2013/09/14 13:09:55 joerg Exp $ */
+/* $NetBSD: isp.c,v 1.126 2017/03/11 12:08:57 maya Exp $ */
 /*
  * Machine and OS Independent (well, as best as possible)
  * code for the Qlogic ISP SCSI adapters.
@@ -43,7 +43,7 @@
  */
 #ifdef __NetBSD__
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.125 2013/09/14 13:09:55 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.126 2017/03/11 12:08:57 maya Exp $");
 #include <dev/ic/isp_netbsd.h>
 #endif
 #ifdef __FreeBSD__
@@ -5114,7 +5114,7 @@
                         * If somebody updated the output pointer, then reset
                         * optr to be one more than the updated amount.
                         */
-                       while (tsto != oop) {
+                       if (tsto != oop) {
                                optr = ISP_NXT_QENTRY(tsto,
                                    RESULT_QUEUE_LEN(isp));
                        }



Home | Main Index | Thread Index | Old Index