Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Follow my own locking rules.



details:   https://anonhg.NetBSD.org/src/rev/bf269492f2e1
branches:  trunk
changeset: 823270:bf269492f2e1
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Apr 17 15:43:40 2017 +0000

description:
Follow my own locking rules.

diffstat:

 sys/dev/usb/ualea.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r ad69dd383334 -r bf269492f2e1 sys/dev/usb/ualea.c
--- a/sys/dev/usb/ualea.c       Mon Apr 17 14:52:52 2017 +0000
+++ b/sys/dev/usb/ualea.c       Mon Apr 17 15:43:40 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ualea.c,v 1.2 2017/04/17 09:16:13 riastradh Exp $      */
+/*     $NetBSD: ualea.c,v 1.3 2017/04/17 15:43:40 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.2 2017/04/17 09:16:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ualea.c,v 1.3 2017/04/17 15:43:40 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/atomic.h>
@@ -142,7 +142,9 @@
            ualea_xfer_done);
 
        /* Success!  We are ready to run.  */
+       mutex_enter(&sc->sc_lock);
        sc->sc_attached = true;
+       mutex_exit(&sc->sc_lock);
 
        /* Get some initial entropy now.  */
        ualea_get(RND_POOLBITS/NBBY, sc);



Home | Main Index | Thread Index | Old Index