Browse Source

Merge tag 'drm-fixes-for-v4.17-rc6-urgent' of git://people.freedesktop.org/~airlied/linux

Pull drm fix from Dave Airlie:
 "This fixes the mmap regression reported to me on irc by an i686 kernel
  user today, he's tested the fix works, and I've audited all the drm
  drivers for the bad mmap usage and since we use the mmap offset as a
  lookup in a table we aren't inclined to have anything bad in there"

[ See commit be83bbf80682 ("mmap: introduce sane default mmap limits")
  for details and the note on why the GPU drivers were expected to be a
  special case.    - Linus ]

* tag 'drm-fixes-for-v4.17-rc6-urgent' of git://people.freedesktop.org/~airlied/linux:
  drm: set FMODE_UNSIGNED_OFFSET for drm files
Linus Torvalds 7 years ago
parent
commit
ee4b65c2e8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/gpu/drm/drm_file.c

+ 1 - 0
drivers/gpu/drm/drm_file.c

@@ -212,6 +212,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
 	filp->private_data = priv;
 	filp->private_data = priv;
+	filp->f_mode |= FMODE_UNSIGNED_OFFSET;
 	priv->filp = filp;
 	priv->filp = filp;
 	priv->pid = get_pid(task_pid(current));
 	priv->pid = get_pid(task_pid(current));
 	priv->minor = minor;
 	priv->minor = minor;