Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix a bug that kmem_alloc() is called from the interrupt...
details: https://anonhg.NetBSD.org/src/rev/3f02f7bc4d5b
branches: trunk
changeset: 781472:3f02f7bc4d5b
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Sat Sep 08 02:58:13 2012 +0000
description:
Fix a bug that kmem_alloc() is called from the interrupt context.
diffstat:
sys/kern/subr_cprng.c | 7 ++++---
sys/netinet/tcp_subr.c | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diffs (55 lines):
diff -r 281b89e2a8a1 -r 3f02f7bc4d5b sys/kern/subr_cprng.c
--- a/sys/kern/subr_cprng.c Fri Sep 07 22:37:27 2012 +0000
+++ b/sys/kern/subr_cprng.c Sat Sep 08 02:58:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $ */
+/* $NetBSD: subr_cprng.c,v 1.12 2012/09/08 02:58:13 msaitoh Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
#include <sys/cprng.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.11 2012/09/07 02:42:13 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.12 2012/09/08 02:58:13 msaitoh Exp $");
void
cprng_init(void)
@@ -284,7 +284,8 @@
* If the generator has just been keyed, perform
* the statistical RNG test.
*/
- if (__predict_false(c->drbg.reseed_counter == 1)) {
+ if (__predict_false(c->drbg.reseed_counter == 1) &&
+ (flags & FASYNC) == 0) {
rngtest_t *rt = kmem_alloc(sizeof(*rt), KM_NOSLEEP);
if (rt) {
diff -r 281b89e2a8a1 -r 3f02f7bc4d5b sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c Fri Sep 07 22:37:27 2012 +0000
+++ b/sys/netinet/tcp_subr.c Sat Sep 08 02:58:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_subr.c,v 1.247 2012/03/22 20:34:39 drochner Exp $ */
+/* $NetBSD: tcp_subr.c,v 1.248 2012/09/08 02:58:13 msaitoh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.247 2012/03/22 20:34:39 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.248 2012/09/08 02:58:13 msaitoh Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -2214,7 +2214,7 @@
*/
if (tcp_iss_gotten_secret == false) {
cprng_strong(kern_cprng,
- tcp_iss_secret, sizeof(tcp_iss_secret), 0);
+ tcp_iss_secret, sizeof(tcp_iss_secret), FASYNC);
tcp_iss_gotten_secret = true;
}
Home |
Main Index |
Thread Index |
Old Index