diff options
author | Dave Airlie <airlied@redhat.com> | 2018-05-14 23:38:15 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-05-15 00:46:04 -0400 |
commit | 76ef6b28ea4f81c3d511866a9b31392caa833126 (patch) | |
tree | a6523e611696a5b7422cfbf04ed9c0ba3d798c42 | |
parent | 67b8d5c7081221efa252e111cd52532ec6d4266f (diff) |
drm: set FMODE_UNSIGNED_OFFSET for drm files
Since we have the ttm and gem vma managers using a subset
of the file address space for objects, and these start at
0x100000000 they will overflow the new mmap checks.
I've checked all the mmap routines I could see for any
bad behaviour but overall most people use GEM/TTM VMA
managers even the legacy drivers have a hashtable.
Reported-and-Tested-by: Arthur Marsh (amarsh04 on #radeon)
Fixes: be83bbf8068 (mmap: introduce sane default mmap limits)
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/drm_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index e394799979a6..6d9b9453707c 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c | |||
@@ -212,6 +212,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor) | |||
212 | return -ENOMEM; | 212 | return -ENOMEM; |
213 | 213 | ||
214 | filp->private_data = priv; | 214 | filp->private_data = priv; |
215 | filp->f_mode |= FMODE_UNSIGNED_OFFSET; | ||
215 | priv->filp = filp; | 216 | priv->filp = filp; |
216 | priv->pid = get_pid(task_pid(current)); | 217 | priv->pid = get_pid(task_pid(current)); |
217 | priv->minor = minor; | 218 | priv->minor = minor; |