]> Cypherpunks repositories - gostls13.git/commit
runtime: only call netpoll if netpollinited returns true
authorIan Lance Taylor <iant@golang.org>
Tue, 7 Nov 2017 04:51:36 +0000 (20:51 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 7 Nov 2017 16:18:12 +0000 (16:18 +0000)
commit86cd9c11764f16a2dcc551336e3aac7ad9f78d3c
treeb8b7e6141f11bffc6920b204b9a95ee546c1e821
parent33c246ff9250ea07b5e0178e0638cb703f90fba3
runtime: only call netpoll if netpollinited returns true

This fixes a race on old Linux kernels, in which we might temporarily
set epfd to an invalid value other than -1. It's also the right thing
to do. No test because the problem only occurs on old kernels.

Fixes #22606

Change-Id: Id84bdd6ae6d7c5d47c39e97b74da27576cb51a54
Reviewed-on: https://go-review.googlesource.com/76319
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/runtime/proc.go