Commit 76879a19 authored by Sandeep Patil's avatar Sandeep Patil
Browse files

ANDROID: fs: pipe: wakeup readers on small writes even if pipe had data



commit '1b6b26ae ("pipe: fix and clarify pipe write wakeup logic")'
change `pipe_write()` wakeup logic to wakeup readers only if the pipe
was empty.

This meant that applications that are not draining the pipe
before each write were exposed to unexpected timeouts / hangs in
epoll_wait() waiting for data in a pipe using EPOLLIN | EPOLLET flags.

This behaviour can be easily tested with android12-5.4 kernel where
the test that uses pipes for notifications in this way works while it
fails 100% with android12-5.10.

This change restores the old behavior to wakeup all pipe_readers if any
new data is written to the pipe.

Bug: 193851993
Bug: 193846582

Change-Id: If0c5a844091ccf16d5236bd072326325d4d5447a
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent 989fb724
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment