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 unlock without having taken the lock.



details:   https://anonhg.NetBSD.org/src/rev/ebf1c5615128
branches:  trunk
changeset: 946078:ebf1c5615128
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Nov 15 12:33:53 2020 +0000

description:
Don't unlock without having taken the lock.

diffstat:

 sys/dev/ic/athn.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 76c108fe27f9 -r ebf1c5615128 sys/dev/ic/athn.c
--- a/sys/dev/ic/athn.c Sun Nov 15 12:02:44 2020 +0000
+++ b/sys/dev/ic/athn.c Sun Nov 15 12:33:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: athn.c,v 1.23 2020/01/29 14:09:58 thorpej Exp $        */
+/*     $NetBSD: athn.c,v 1.24 2020/11/15 12:33:53 mlelstv Exp $        */
 /*     $OpenBSD: athn.c,v 1.83 2014/07/22 13:12:11 mpi Exp $   */
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.23 2020/01/29 14:09:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.24 2020/11/15 12:33:53 mlelstv Exp $");
 
 #ifndef _MODULE
 #include "athn_usb.h"          /* for NATHN_USB */
@@ -2734,7 +2734,7 @@
 
        if ((ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) != 0) {
                lo = hi = 0xffffffff;
-               goto done;
+               goto done2;
        }
        lo = hi = 0;
        ETHER_LOCK(ec);
@@ -2760,6 +2760,7 @@
        }
  done:
        ETHER_UNLOCK(ec);
+ done2:
        AR_WRITE(sc, AR_MCAST_FIL0, lo);
        AR_WRITE(sc, AR_MCAST_FIL1, hi);
        AR_WRITE_BARRIER(sc);



Home | Main Index | Thread Index | Old Index