Revision 0dd1e3773ae8afc4bfdce782bdeffc10f9cae6ec authored by Jan Stancek on 22 December 2019, 12:33:24 UTC, committed by Linus Torvalds on 22 December 2019, 17:47:47 UTC
LTP pipeio_1 test is hanging with v5.5-rc2-385-gb8e382a185eb, with read side observing empty pipe and sleeping and write side running out of space and then sleeping as well. In this scenario there are 5 writers and 1 reader. Problem is that after pipe_write() reacquires pipe lock, it re-checks for empty pipe with potentially stale 'head' and doesn't wake up read side anymore. pipe->tail can advance beyond 'head', because there are multiple writers. Use pipe->head for empty pipe check after reacquiring lock to observe current state. Testing: With patch, LTP pipeio_1 ran successfully in loop for 1 hour. Without patch it hanged within a minute. Fixes: 1b6b26ae7053 ("pipe: fix and clarify pipe write wakeup logic") Reported-by: Rachel Sibley <rasibley@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b8e382a
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 1.0 KB |
Makefile | -rw-r--r-- | 385 bytes |
cache.c | -rw-r--r-- | 3.0 KB |
cnode.c | -rw-r--r-- | 4.8 KB |
coda_cache.h | -rw-r--r-- | 712 bytes |
coda_fs_i.h | -rw-r--r-- | 1.9 KB |
coda_int.h | -rw-r--r-- | 611 bytes |
coda_linux.c | -rw-r--r-- | 5.4 KB |
coda_linux.h | -rw-r--r-- | 2.5 KB |
coda_psdev.h | -rw-r--r-- | 3.3 KB |
dir.c | -rw-r--r-- | 14.2 KB |
file.c | -rw-r--r-- | 7.9 KB |
inode.c | -rw-r--r-- | 7.2 KB |
pioctl.c | -rw-r--r-- | 2.1 KB |
psdev.c | -rw-r--r-- | 10.2 KB |
symlink.c | -rw-r--r-- | 1.1 KB |
sysctl.c | -rw-r--r-- | 1.2 KB |
upcall.c | -rw-r--r-- | 24.3 KB |
Computing file changes ...