drm: make sure page protections are updated after changing vm_flags
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 17 Nov 2009 22:08:54 +0000 (14:08 -0800)
committerDave Airlie <airlied@redhat.com>
Tue, 24 Nov 2009 03:02:30 +0000 (13:02 +1000)
commit79cc304f3e2fda202242036326afb2aeca486156
treec8bcdd91b36e8663b94911c6ac2481eadbe53bb0
parentf82f5f3ac4de6c6b872fcbb3dec97f368e78ff58
drm: make sure page protections are updated after changing vm_flags

Some architectures compute ->vm_page_prot depending on ->vm_flags, so we
need to update the protections after adjusting the flags.

AFAIK this only affects running X under Xen; without this patch you get
lots of coloured blobs on the screen, or maybe a complete lockup.  Or
anything really.

But that still depends on lots of out-of-tree stuff, so I don't think
there are any consequences for anyone else.  But it is wrong in principle.

Reported-by: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_gem.c