diff options
author | Bhasker Hariharan <bhaskerh@google.com> | 2020-03-18 06:35:34 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-18 06:36:43 -0700 |
commit | c29d4fc59eefefa71526daf030844a4b449c91b9 (patch) | |
tree | d05c24c21b8d4e6b462d2ca030c0cbada8134f4c /pkg/rand | |
parent | eddd6ce514e3bbcc08ce9d8435c7dac12715989c (diff) |
Automated rollback of changelist 301501607
PiperOrigin-RevId: 301578043
Diffstat (limited to 'pkg/rand')
-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 |