--- - branch: MAIN date: Sun Jul 21 22:30:19 UTC 2013 files: - new: '1.16' old: '1.15' path: src/sys/dev/rndpseudo.c pathrev: src/sys/dev/rndpseudo.c@1.16 type: modified id: 20130721T223019Z.9ccf810b97f878348d0a289f8cb3a0f5eebbd704 log: | When reading from /dev/random, block at most once in cprng_strong. We are not obligated to return exactly as many bytes as requested, and many applications -- notably those that use stdio or otherwise buffered I/O to read from /dev/random -- try to read many more than 32 bytes at a time from /dev/random even if all they are about to use is 32 bytes. In this case, blocking until we have enough entropy to fill a large buffer causes needless application delays, e.g. causing cgdconfig (which reads from /dev/random with stdio) to hang at boot when trying to configure a random-keyed device for swap. Patch tested by Aran Clauson. Fixes PR kern/48028. module: src subject: 'CVS commit: src/sys/dev' unixtime: '1374445819' user: riastradh