patchThe GNU Hurd - Patches: patch #8586, Make sure to free content dir in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8586: Make sure to free content dir in procfs

Submitter:  Lancelot SIX <lsix>
Submitted:  Thu 25 Dec 2014 09:14:06 PM UTC
   
 
Category:  other Hurd Priority:  3 - Low
Status:  Invalid Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None
Wiki-like text discussion box: 


Fri 26 Dec 2014 01:46:59 PM UTC, comment #3: 

Actually you are right.

I came with this patch while re-using parts of procfs (without the procfs_get_contents caching mechanism).
I've been a bit too fast forwarding my change into the original procfs codebase.

Next time, I'll have to get a proper subhurd up and running to perform tests and detect the double free corruption...

Sorry for the inappropriate patch... I'll be more careful next time !

I think the discussion can be closed at this point.

Lancelot SIX <lsix>
Fri 26 Dec 2014 01:24:43 PM UTC, comment #2: 

Mmm, on second reading, no, it's not so clear that there is a leak
here: the pointer returned by procfs_get_contents is held in the node
itself, and thus freed when the node gets freed.

In which situation did you notice a leak?

Samuel Thibault <sthibaul>
Group administrator
Fri 26 Dec 2014 10:48:56 AM UTC, comment #1: 

Applied, thanks!

Samuel Thibault <sthibaul>
Group administrator
Thu 25 Dec 2014 09:14:06 PM UTC, original submission:  

procfs/netfs.c:netfs_get_dirents, make sure to free the memory
  allocated with the "get_contents" callback of nodes.

Lancelot SIX <lsix>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sthibaul (Posted a comment)
  • -email is unavailable- added by lsix (Submitted the item)
  • -email is unavailable- added by lsix
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-26 sthibaul StatusNone Invalid
        Open/ClosedOpen Closed
    2014-12-26 sthibaul StatusDone None
        Open/ClosedClosed Open
    2014-12-26 sthibaul StatusNone Done
        Open/ClosedOpen Closed
    2014-12-25 lsix Attached File- Added 0001-Make-sure-to-free-content-dir-in-procfs.patch, #32713
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code