#411 closed defect (fixed)

Renaming a memfile and then unlinking it causes a memory leak

Reported by: ptorre Owned by: Jennifer Averett
Priority: normal Milestone: 2
Component: fs Version: unknown
Severity: major Keywords:
Cc: bugs@…, joel.sherrill@… Blocked By:


When deleting a memfile that has been renamed, the st_nlink member of the jnode is decremented twice (once by IMFS_unlink(), and once more by memfile_rmnod()). This makes st_nlink underflow and prevents the storage from being deallocated.


Host = Linux i686 (Slackware 8.1)
Target = MPC860 with unsubmitted BSP

Create a file in the IMFS. Rename it. Call unlink() on the new name. The memory used by the file will not be deallocated.

Attachments (1)

imfs_unlink.c.diff (962 bytes) - added by ptorre on 12/03/06 at 13:31:12.

Download all attachments as: .zip

Change History (2)

comment:1 Changed on 06/10/03 at 16:32:22 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to trunk and 4.6 release branch.

Changed on 12/03/06 at 13:31:12 by ptorre

Attachment: imfs_unlink.c.diff added


Note: See TracTickets for help on using tickets.