Messages in this thread | | | Date | Mon, 23 Mar 1998 12:13:52 -0500 | From | Bill Hawes <> | Subject | patch for 2.1.90 files access |
| |
The attached patch adds wrappers for the remaining accesses to files->fd[], except for some arch-specific code. The changes are mostly straightforward replacements of current->files->fd[] with fget() or fcheck() as appropriate.
To handle the references to non-current tasks (mostly in /proc, but also in tty_io.c for SAK handling), I've added an fcheck_task() wrapper in file.h.
In sys_poll I added a sanity check for the value of nfds; otherwise, it appears that passing a suitably large value will result in trashing memory. (When nfds * sizeof poll structure wraps around.)
Once these changes are in place, the next step is to provide variable-sized fd arrays, which should bring significantly reduced memory consumption as well as a speed-up of forking and other operations that loop over fds.
Regards, Bill[unhandled content-type:application/x-gzip] | |