IMFS / memfile bug?
Till Straumann
strauman at SLAC.Stanford.EDU
Tue Sep 17 01:50:49 UTC 2002
Hi Joel.
Joel Sherrill wrote:
>
>Till Straumann wrote:
>
>>Sorry, if this is already known - it seems I can't access the bug
>>tracking system
>>right now.
>>
>
>www.oarcorp.com had a security breach. It is undergoing an
>audit and upgrade. :(
>
Sorry to hear that - what a nuisance :-(
>
>>There seems to be bug in the IMFS/memfile implementation:
>>Memory for files who are closed after removal (e.g. created
>>by tmpfile()) seems to be never released...
>>
>>Is anybody working on IMFS?
>>
>
>Jennifer and I wrote the IMFS. We fix bugs as they are reported.
>Please send a test case and we will look into it.
>
IMO it's easier to look at the source than producing a test case -
you'll see it immediately. I came across it when tmpfile() ate
up all my memory.
tmpfile() opens a file, unlink()s it and returns the open file to the
caller. The file is supposed to be physically removed upon close().
Now, memfile_rmnod() [correctly] refuses to release the memory
occupied by an open file. However, there should be a check in
memfile_close() for this case [i.e. last close of a file that has
already been unlinked from a directory]. Fixing this shouldn't be
hard but I don't have the time right now to study the details
which you and Jennifer are more familiar with anyways...
Kind regards
-- Till
>
>>Till.
>>
>
More information about the users
mailing list