Module Name: src Committed By: snj Date: Wed Sep 16 04:04:40 UTC 2009
Modified Files: src/sys/dev [netbsd-5-0]: rnd.c Log Message: Pull up following revision(s) (requested by pooka in ticket #948): sys/dev/rnd.c: revision 1.74 rnd_wakeup_readers() uses rndpool_mtx for its own consistency management, so it cannot be called with the mutex held. There is no consistency requirement to synchronize over the whole add-and-wakeup operation, as if data is consumed in the window the mutex is locked, wakeups will simply be skipped. fix from Juho Salminen in PR kern/42020. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.71.10.1 src/sys/dev/rnd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/rnd.c diff -u src/sys/dev/rnd.c:1.71 src/sys/dev/rnd.c:1.71.10.1 --- src/sys/dev/rnd.c:1.71 Sat Aug 16 13:07:30 2008 +++ src/sys/dev/rnd.c Wed Sep 16 04:04:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.c,v 1.71 2008/08/16 13:07:30 dan Exp $ */ +/* $NetBSD: rnd.c,v 1.71.10.1 2009/09/16 04:04:39 snj Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.71 2008/08/16 13:07:30 dan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rnd.c,v 1.71.10.1 2009/09/16 04:04:39 snj Exp $"); #include <sys/param.h> #include <sys/ioctl.h> @@ -639,9 +639,9 @@ mutex_enter(&rndpool_mtx); rndpool_add_data(&rnd_pool, rnddata->data, rnddata->len, rnddata->entropy); + mutex_exit(&rndpool_mtx); rnd_wakeup_readers(); - mutex_exit(&rndpool_mtx); break;