mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
drm: set FMODE_UNSIGNED_OFFSET for drm files
commit76ef6b28ea
upstream. 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:be83bbf806
(mmap: introduce sane default mmap limits) Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3fe4b0cf93
commit
2abd4c3ed2
1 changed files with 1 additions and 0 deletions
|
@ -212,6 +212,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
|
|||
return -ENOMEM;
|
||||
|
||||
filp->private_data = priv;
|
||||
filp->f_mode |= FMODE_UNSIGNED_OFFSET;
|
||||
priv->filp = filp;
|
||||
priv->pid = get_pid(task_pid(current));
|
||||
priv->minor = minor;
|
||||
|
|
Loading…
Reference in a new issue