Messages in this thread | | | Date | Wed, 6 Feb 2008 20:13:04 +0000 (GMT) | From | Hugh Dickins <> | Subject | Re: [PATCH] sys_remap_file_pages: fix ->vm_file accounting |
| |
[ removed stable ]
On Sun, 3 Feb 2008, Oleg Nesterov wrote: > Off-topic question to all. sys_remap_file_pages() doesn't work with > shared readonly mappings, why?
Slight correction: it works with shared readonly mappings, doesn't it, so long as the mmap'ed file was opened for reading and writing?
> IOW, why it checks VM_SHARED but not VM_MAYSHARE?
My guess has always been that it was just a misunderstanding of how those VM_ flags end up working: assume so unless Ingo corrects me.
By the time I realized that oddity, we'd been driven into several tiresome corners by the very existence of sys_remap_file_pages. So whereas my usual instinct would have been to relax the restriction and generalize, in its case I wanted to hold on to every restriction we had.
sys_remap_file_pages does serve a useful purpose; but it subverts vma principles, and has therefore caused us grief repeatedly.
Hugh
| |