PIPE - Fix more races in the pipe code
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 5 Sep 2009 20:12:49 +0000 (13:12 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 5 Sep 2009 20:12:49 +0000 (13:12 -0700)
commit1bfdcce2a8c8263c29626118d9e2416d0e1fb59e
tree8e091aa294dce9b809bcb4f89ced0e49a1df1442
parentc7276d9e855e4f81dd0db61a8714ca7c1acf04d1
PIPE - Fix more races in the pipe code

* Numerous additional races can occur with the setting and clearing of
  PIPE_SEL.

* EOF must be retested after getting the second token lock because the
  acquisition of the second lock can temporarily release the first one.

Reported-by: Tobias Weingartner <weingart@tepid.org>, Rumko
sys/kern/sys_pipe.c