Skip to content

Safely removing mmaped files

Eric W. Biederman linux-fsdevel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mm: Introduce revoke_file_mappings.include/linux/mm.h mm/memory.c+142 -01 reply
2/4sysfs: Use revoke_file_mappingsfs/sysfs/bin.c+13 -1970 replies
3/4proc: Clean up mmaps when a proc file is removed.fs/proc/generic.c+2 -00 replies
4/4pci: Remove bogus check of proc dir entry usage.drivers/pci/proc.c+0 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Safely removing mmaped files

Currently when mmaped files are removed I have not found a single instance in the kernel where we handle it correctly. Frequently after a hot remove we will either leak a file (with weird ensuing consequences) or we will goof and not call vm_ops->close() which can cause leaks.

It turns out this problem isn't too bad to actually fix and this patchset is my generic solution. Tested against 2.6.31-rc8 with a process that mmaped /sys/*/*/resource0 and /proc/bus/pci/*/*.

I'm not certain what the best way to carry these patches is to get them merged. Andrew can you carry this patchset?

Eric

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>