Re: [RFC] pipe: prevent compiler reordering in pipe_poll

2018-09-10 Thread Paolo Bonzini
On 25/08/2018 00:54, Eric Wong wrote: > The pipe_poll function does not use locks, and adding an entry > to the waitqueue is not guaranteed to happen before pipe->nrbufs > (or other fields) are read, leading to missed wakeups. > > Looking at Ruby CI build logs and backtraces, I've noticed > occasi

Re: [RFC] pipe: prevent compiler reordering in pipe_poll

2018-08-24 Thread Al Viro
On Fri, Aug 24, 2018 at 10:54:31PM +, Eric Wong wrote: > The pipe_poll function does not use locks, and adding an entry > to the waitqueue is not guaranteed to happen before pipe->nrbufs > (or other fields) are read, leading to missed wakeups. > > Looking at Ruby CI build logs and backtraces,

[RFC] pipe: prevent compiler reordering in pipe_poll

2018-08-24 Thread Eric Wong
The pipe_poll function does not use locks, and adding an entry to the waitqueue is not guaranteed to happen before pipe->nrbufs (or other fields) are read, leading to missed wakeups. Looking at Ruby CI build logs and backtraces, I've noticed occasional instances where processes are stuck in select