Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=369b8f5a70402d9fe77006cd0044c8a3fcd08430
Commit:     369b8f5a70402d9fe77006cd0044c8a3fcd08430
Parent:     4670df831cb479ba57dd0fa0b8a9eb88cc7129be
Author:     Nick Piggin <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 4 23:45:25 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 5 09:21:20 2007 -0800

    mm: fix XIP file writes
    
    Writing to XIP files at a non-page-aligned offset results in data corruption
    because the writes were always sent to the start of the page.
    
    Signed-off-by: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Christian Borntraeger <[EMAIL PROTECTED]>
    Acked-by: Carsten Otte <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/filemap_xip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index 32132f3..e233fff 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -314,7 +314,7 @@ __xip_file_write(struct file *filp, const char __user *buf,
                fault_in_pages_readable(buf, bytes);
                kaddr = kmap_atomic(page, KM_USER0);
                copied = bytes -
-                       __copy_from_user_inatomic_nocache(kaddr, buf, bytes);
+                       __copy_from_user_inatomic_nocache(kaddr + offset, buf, 
bytes);
                kunmap_atomic(kaddr, KM_USER0);
                flush_dcache_page(page);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to