Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ax25: Fix deadlock hang during concurrent read and write on socket.
Before this patch, this hangs, because the read(2) blocks the write(2). Before: strace -f -eread,write ./examples/client_lockcheck M0THC-9 M0THC-0 M0THC-2 strace: Process 3888 attached [pid 3888] read(3, <unfinished ...> [pid 3887] write(3, "hello world", 11 [hang] After: strace -f -eread,write ./examples/client_lockcheck M0THC-9 M0THC-0 M0THC-2 strace: Process 2433 attached [pid 2433] read(3, <unfinished ...> [pid 2432] write(3, "hello world", 11) = 11 [pid 2433] <... read resumed> "yo", 1000) = 2 [pid 2433] write(1, "yo\n", 3yo ) = 3 [successful exit] Signed-off-by: Thomas Habets <thomas@habets.se> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
- Loading branch information