diff options
author | dillon <dillon@FreeBSD.org> | 2000-11-18 21:01:04 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2000-11-18 21:01:04 +0000 |
commit | 15a44d16ca10bf52da55462560c345940cd19b38 (patch) | |
tree | 8d59044fc11c59a31ff7d5eb596055dcd4bfa68c /sys/vm/swap_pager.c | |
parent | fd59970ee1df44d623fb078d21e32c352d64b79f (diff) | |
download | FreeBSD-src-15a44d16ca10bf52da55462560c345940cd19b38.zip FreeBSD-src-15a44d16ca10bf52da55462560c345940cd19b38.tar.gz |
This patchset fixes a large number of file descriptor race conditions.
Pre-rfork code assumed inherent locking of a process's file descriptor
array. However, with the advent of rfork() the file descriptor table
could be shared between processes. This patch closes over a dozen
serious race conditions related to one thread manipulating the table
(e.g. closing or dup()ing a descriptor) while another is blocked in
an open(), close(), fcntl(), read(), write(), etc...
PR: kern/11629
Discussed with: Alexander Viro <viro@math.psu.edu>
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r-- | sys/vm/swap_pager.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index b1f4802..6a427c9 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1542,8 +1542,10 @@ swp_pager_async_iodone(bp) * be overridden by the original caller of * getpages so don't play cute tricks here. * - * XXX it may not be legal to free the page - * here as this messes with the object->memq's. + * XXX IT IS NOT LEGAL TO FREE THE PAGE HERE + * AS THIS MESSES WITH object->memq, and it is + * not legal to mess with object->memq from an + * interrupt. */ m->valid = 0; |