[lkml]   [2005]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectPROBLEM: mmap_kmem()
Bug in mmap_kmem(), drivers/char/mem.c.
When mapping the kmem, page alingning seems to mess the address:

unsigned long long val;
val = (u64)vma->vm_pgoff << PAGE_SHIFT;
vma->vm_pgoff = ((unsigned long)val >> PAGE_SHIFT) - PAGE_OFFSET;
vma->vm_pgoff = __pa(val) >> PAGE_SHIFT;

Subtracting 0xc0000000 and shifting is made in wrong order.

Valentin Rabinovich

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-18 10:56    [W:0.036 / U:2.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site