[Bugme-new] [Bug 20222] New: remap_file_pages fails on O_RDONLY file descriptor
bugzilla-daemon at bugzilla.kernel.org
bugzilla-daemon at bugzilla.kernel.org
Tue Oct 12 19:41:04 PDT 2010
https://bugzilla.kernel.org/show_bug.cgi?id=20222
Summary: remap_file_pages fails on O_RDONLY file descriptor
Product: Memory Management
Version: 2.5
Kernel Version: 2.6.35
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: akpm at linux-foundation.org
ReportedBy: chris2k01 at hotmail.com
Regression: No
Created an attachment (id=33412)
--> (https://bugzilla.kernel.org/attachment.cgi?id=33412)
A test program demonstrating the bug
If a file is opened with O_RDONLY and then mmap()ed, calling remap_file_pages()
on the mapped region fails with EINVAL. The attached test program demonstrates
the problem: compile and run it, and it will fail with "remap_file_pages:
Invalid argument". Change O_RDONLY in the second open() call to O_RDWR and it
will stop failing. Of course, this is not a useful workaround if one doesn't
have write access to the target file!
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Bugme-new
mailing list