diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/rand/rand_linux.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/pkg/rand/rand_linux.go b/pkg/rand/rand_linux.go index 1aec96e2b..0bdad5fad 100644 --- a/pkg/rand/rand_linux.go +++ b/pkg/rand/rand_linux.go @@ -45,18 +45,12 @@ func (r *reader) Read(p []byte) (int, error) { return rand.Read(p) } -// mu protects the global Reader below. -var mu sync.Mutex - // Reader is the default reader. var Reader io.Reader = &reader{} // Read reads from the default reader. func Read(b []byte) (int, error) { - mu.Lock() - n, err := io.ReadFull(Reader, b) - mu.Unlock() - return n, err + return io.ReadFull(Reader, b) } // Init can be called to make sure /dev/urandom is pre-opened on kernels that |