Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Skip disabled sources in rnd_getmore.



details:   https://anonhg.NetBSD.org/src/rev/79b87633ff08
branches:  trunk
changeset: 343847:79b87633ff08
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Feb 28 20:20:17 2016 +0000

description:
Skip disabled sources in rnd_getmore.

diffstat:

 sys/kern/kern_rndq.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 7aaa0573a490 -r 79b87633ff08 sys/kern/kern_rndq.c
--- a/sys/kern/kern_rndq.c      Sun Feb 28 19:39:27 2016 +0000
+++ b/sys/kern/kern_rndq.c      Sun Feb 28 20:20:17 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_rndq.c,v 1.83 2016/02/27 14:30:33 mlelstv Exp $   */
+/*     $NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1997-2013 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.83 2016/02/27 14:30:33 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.84 2016/02/28 20:20:17 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -260,6 +260,10 @@
 
        mutex_spin_enter(&rnd_global.lock);
        LIST_FOREACH_SAFE(rs, &rnd_global.sources, list, next) {
+               /* Skip if the source is disabled.  */
+               if (!RND_ENABLED(rs))
+                       continue;
+
                /* Skip if there's no callback.  */
                if (!ISSET(rs->flags, RND_FLAG_HASCB))
                        continue;



Home | Main Index | Thread Index | Old Index