diff options
author | Eric Anholt <eric@anholt.net> | 2009-04-07 16:01:22 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-08 10:50:56 -0700 |
commit | e5e9ecde63ba365b510df0f4a9cb3b048a0ad785 (patch) | |
tree | 2ef878606a0483e7cac427ebb40dabd1c2346ba7 /drivers/gpu/drm | |
parent | 2bc43b5cf5158a26fa1328234795abed2dff5275 (diff) | |
download | blackbird-op-linux-e5e9ecde63ba365b510df0f4a9cb3b048a0ad785.tar.gz blackbird-op-linux-e5e9ecde63ba365b510df0f4a9cb3b048a0ad785.zip |
drm/i915: Correctly set the write flag for get_user_pages in pread.
Otherwise, the results of our read didn't show up when we were faulting in
the page being read into (as happened with a testcase reading into a big
stack area). Likely accounts for some conformance test failures.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 6f7d0e27036f..3a1189d94a9a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -287,7 +287,7 @@ i915_gem_shmem_pread_slow(struct drm_device *dev, struct drm_gem_object *obj, down_read(&mm->mmap_sem); pinned_pages = get_user_pages(current, mm, (uintptr_t)args->data_ptr, - num_pages, 0, 0, user_pages, NULL); + num_pages, 1, 0, user_pages, NULL); up_read(&mm->mmap_sem); if (pinned_pages < num_pages) { ret = -EFAULT; |