Index: head/sys/dev/random/randomdev.c =================================================================== --- head/sys/dev/random/randomdev.c +++ head/sys/dev/random/randomdev.c @@ -156,6 +156,10 @@ error = tsleep(&random_alg_context, PCATCH, "randseed", hz/10); if (error == ERESTART || error == EINTR) break; + /* Squash tsleep timeout condition */ + if (error == EWOULDBLOCK) + error = 0; + KASSERT(error == 0, ("unexpected tsleep error %d", error)); } if (error == 0) { read_rate_increment((uio->uio_resid + sizeof(uint32_t))/sizeof(uint32_t)); @@ -184,9 +188,13 @@ * uninterruptible syscalls. */ if (error == 0 && uio->uio_resid != 0 && - total_read % sigchk_period == 0) + total_read % sigchk_period == 0) { error = tsleep_sbt(&random_alg_context, PCATCH, "randrd", SBT_1NS, 0, C_HARDCLOCK); + /* Squash tsleep timeout condition */ + if (error == EWOULDBLOCK) + error = 0; + } } if (error == ERESTART || error == EINTR) error = 0;