remap_file_pages protection support: use EOVERFLOW ret code
Subsystems (2)
PATCH 21/39 remap_file_pages protection support: use EOVERFLOW ret code
From: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Use -EOVERFLOW ("Value too large for defined data type") rather than -EINVAL when we cannot store the file offset in the PTE.
---
linux-2.6.git-paolo/mm/fremap.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
mm/fremap.c renamed from mm/fremap.c~rfp-ef2big-ret-code +1 -1
@@ -213,7 +213,7 @@ asmlinkage long sys_remap_file_pages(uns/* Can we represent this offset inside this architecture's pte's? */ #if PTE_FILE_MAX_BITS <BITS_PER_LONG if (pgoff + (size >>PAGE_SHIFT ) >= (1UL <<PTE_FILE_MAX_BITS )) -return err; +return -EOVERFLOW ;#endif /* We need down_write() to change vma->vm_flags. */
_
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel