diff options
author | Eric Anholt <eric@anholt.net> | 2009-04-07 19:01:22 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-08 13:50:56 -0400 |
commit | e5e9ecde63ba365b510df0f4a9cb3b048a0ad785 (patch) | |
tree | 2ef878606a0483e7cac427ebb40dabd1c2346ba7 /drivers | |
parent | 2bc43b5cf5158a26fa1328234795abed2dff5275 (diff) |
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')
-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, | |||
287 | 287 | ||
288 | down_read(&mm->mmap_sem); | 288 | down_read(&mm->mmap_sem); |
289 | pinned_pages = get_user_pages(current, mm, (uintptr_t)args->data_ptr, | 289 | pinned_pages = get_user_pages(current, mm, (uintptr_t)args->data_ptr, |
290 | num_pages, 0, 0, user_pages, NULL); | 290 | num_pages, 1, 0, user_pages, NULL); |
291 | up_read(&mm->mmap_sem); | 291 | up_read(&mm->mmap_sem); |
292 | if (pinned_pages < num_pages) { | 292 | if (pinned_pages < num_pages) { |
293 | ret = -EFAULT; | 293 | ret = -EFAULT; |