lkml.org 
[lkml]   [1998]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpatch 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]
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.022 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site