]> Git Repo - linux.git/commit
fbmem: VM_IO set, but not propagated
authorDaniel De Graaf <[email protected]>
Wed, 11 Aug 2010 01:02:45 +0000 (18:02 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Aug 2010 15:59:12 +0000 (08:59 -0700)
commitc07fbfd17e614a76b194f371c5331e21e6cffb54
tree34bd53668b5b45b344411d49d8acf6d466004428
parentdaf695fca877068d7533a1b431b09210e5ad0b6b
fbmem: VM_IO set, but not propagated

When we setup up the VMA flags for the mmap flag and we end up using the
fallback mmap functionality we set the vma->vm_flags |= VM_IO.  However we
neglect to propagate the flag to the vma->vm_page_prot.

This bug was found when Linux kernel was running under Xen.  In that
scenario, any page that has VM_IO flag to it, means that it MUST be a
MMIO/VRAM backend memory , _not_ System RAM.  That is what the fbmem.c
does: sets VM_IO, ioremaps the region - everything is peachy.

Well, not exactly.  The vm_page_prot does not get the relevant PTE flags
set (_PAGE_IOMAP) which under Xen is a death-kneel to pages that are
referencing real physical devices but don't have that flag set.

This patch fixes this.

Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Daniel De Graaf <[email protected]>
Tested-by: Eamon Walsh <[email protected]>
Cc: Florian Tobias Schandinat <[email protected]>
Cc: Dave Airlie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/video/fbmem.c
This page took 0.05281 seconds and 4 git commands to generate.