Source-Changes-HG archive

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

[src/trunk]: src/sys/kern entropy_read_filtops is MPSAFE.



details:   https://anonhg.NetBSD.org/src/rev/1368da556e48
branches:  trunk
changeset: 1023799:1368da556e48
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 26 15:10:51 2021 +0000

description:
entropy_read_filtops is MPSAFE.

diffstat:

 sys/kern/kern_entropy.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r f92955b486a7 -r 1368da556e48 sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c   Sun Sep 26 15:08:29 2021 +0000
+++ b/sys/kern/kern_entropy.c   Sun Sep 26 15:10:51 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_entropy.c,v 1.32 2021/09/26 01:16:10 thorpej Exp $        */
+/*     $NetBSD: kern_entropy.c,v 1.33 2021/09/26 15:10:51 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.32 2021/09/26 01:16:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.33 2021/09/26 15:10:51 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1465,8 +1465,9 @@
        return ret;
 }
 
+/* XXX Makes sense only for /dev/u?random.  */
 static const struct filterops entropy_read_filtops = {
-       .f_flags = FILTEROP_ISFD,/* XXX Makes sense only for /dev/u?random.  */
+       .f_flags = FILTEROP_ISFD | FILTEROP_MPSAFE,
        .f_attach = NULL,
        .f_detach = filt_entropy_read_detach,
        .f_event = filt_entropy_read_event,



Home | Main Index | Thread Index | Old Index