Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/random/randomdev.c
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | #undef SIGCHK_PERIOD | ||||
/* | /* | ||||
* Short reads due to signal interrupt should not indicate error. | * Short reads due to signal interrupt should not indicate error. | ||||
* Instead, the uio will reflect that the read was shorter than | * Instead, the uio will reflect that the read was shorter than | ||||
* requested. | * requested. | ||||
*/ | */ | ||||
if (error == ERESTART || error == EINTR) | if (error == ERESTART || error == EINTR) | ||||
error = 0; | error = 0; | ||||
explicit_bzero(random_buf, bufsize); | zfree(random_buf, M_ENTROPY); | ||||
free(random_buf, M_ENTROPY); | |||||
return (error); | return (error); | ||||
} | } | ||||
/*- | /*- | ||||
* Kernel API version of read_random(). This is similar to read_random_uio(), | * Kernel API version of read_random(). This is similar to read_random_uio(), | ||||
* except it doesn't interface with uio(9). It cannot assumed that random_buf | * except it doesn't interface with uio(9). It cannot assumed that random_buf | ||||
* is a multiple of RANDOM_BLOCKSIZE bytes. | * is a multiple of RANDOM_BLOCKSIZE bytes. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |