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-- | 1003 bytes |
Makefile | -rw-r--r-- | 406 bytes |
client.c | -rw-r--r-- | 52.6 KB |
error.c | -rw-r--r-- | 6.8 KB |
mod.c | -rw-r--r-- | 3.7 KB |
protocol.c | -rw-r--r-- | 13.2 KB |
protocol.h | -rw-r--r-- | 686 bytes |
trans_common.c | -rw-r--r-- | 819 bytes |
trans_common.h | -rw-r--r-- | 546 bytes |
trans_fd.c | -rw-r--r-- | 25.2 KB |
trans_rdma.c | -rw-r--r-- | 18.5 KB |
trans_virtio.c | -rw-r--r-- | 19.4 KB |
trans_xen.c | -rw-r--r-- | 13.8 KB |
Computing file changes ...