[Devel] Re: [RFC v10][PATCH 08/13] Dump open file descriptors

Dave Hansen dave at linux.vnet.ibm.com
Mon Dec 1 12:51:19 PST 2008


On Mon, 2008-12-01 at 15:23 -0500, Oren Laadan wrote:
> Verifying that the size doesn't change does not ensure that the table's
> contents remained the same, so we can still end up with obsolete data.

With the realloc() scheme, we have virtually no guarantees about how the
fdtable that we read relates to the source.  All that we know is that
the n'th fd was at this value at *some* time.

Using the scheme that I just suggested (and you evidently originally
used) at least guarantees that we have an atomic copy of the fdtable.

Why is this done in two steps?  It first grabs a list of fd numbers
which needs to be validated, then goes back and turns those into 'struct
file's which it saves off.  Is there a problem with doing that
fd->'struct file' conversion under the files->file_lock?

-- Dave

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list