From: Daniel De Graaf Date: Wed, 11 Aug 2010 01:02:45 +0000 (-0700) Subject: fbmem: VM_IO set, but not propagated X-Git-Tag: v2.6.36-rc1~164 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c07fbfd17e614a76b194f371c5331e21e6cffb54;p=pandora-kernel.git 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 Signed-off-by: Daniel De Graaf Tested-by: Eamon Walsh Cc: Florian Tobias Schandinat Cc: Dave Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed