Thread (17 messages) 17 messages, 5 authors, 2012-04-14

Re: [PATCH] mm: extend prefault helpers to fault in more than PAGE_SIZE

From: Hillf Danton <hidden>
Date: 2012-02-16 13:32:11
Also in: dri-devel, intel-gfx, lkml

On Thu, Feb 16, 2012 at 8:01 PM, Daniel Vetter [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -416,17 +417,20 @@ static inline int fault_in_pages_writeable(char __user *uaddr, int size)
        * Writing zeroes into userspace here is OK, because we know that if
        * the zero gets there, we'll be overwriting it.
        */
-       ret = __put_user(0, uaddr);
+       while (uaddr <= end) {
+               ret = __put_user(0, uaddr);
+               if (ret != 0)
+                       return ret;
+               uaddr += PAGE_SIZE;
+       }
What if
             uaddr & ~PAGE_MASK == PAGE_SIZE -3 &&
                end & ~PAGE_MASK == 2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help