[PATCH] Race in pipe code

From: Christian Ehrhardt (ehrhardt@mathematik.uni-ulm.de)
Date: Sat Jul 15 2000 - 17:14:43 EST


Hi,

I can prove the race now (sample code attached) and I have a patch that fixes
it for me. If noone sees problems with the patch I'll send it to Linus.
The patch was developped for 2.3.99-pre9 but it applies cleanly against
2.4.0-test4.

The nice(20) in the test program isn't needed, it just helps to trigger the
race. About 50% of the time the program prints BBBBBBBBBB on stderr and
4000(!) A's on stdout which is clearly wrong. The patch basically makes
sure that the same reader continues to read from the pipe after it went
to sleep.

    regards Christian

-- 
THAT'S ALL FOLKS!



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:22 EST