diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-26 08:14:47 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-26 08:14:47 +0200 |
commit | 9bf9d47a29afbf7a43eae74a988a4aefe88ccbfd (patch) | |
tree | 966b838e2190a7d6868cda5f4eee6d0f490da27c /drivers/video/udlfb.c | |
parent | video: vt8500: fix Kconfig for videomode (diff) | |
parent | fbdev: fix check for fb_mmap's mmio availability (diff) | |
download | linux-9bf9d47a29afbf7a43eae74a988a4aefe88ccbfd.tar.xz linux-9bf9d47a29afbf7a43eae74a988a4aefe88ccbfd.zip |
Merge branch '3.10/fb-mmap' into for-next
Merge topic branch to get vm_iomap_memory into use.
Conflicts:
drivers/video/fbmon.c
Diffstat (limited to 'drivers/video/udlfb.c')
-rw-r--r-- | drivers/video/udlfb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/udlfb.c b/drivers/video/udlfb.c index 86d449ea3169..ec03e726c940 100644 --- a/drivers/video/udlfb.c +++ b/drivers/video/udlfb.c @@ -324,7 +324,11 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma) unsigned long offset = vma->vm_pgoff << PAGE_SHIFT; unsigned long page, pos; - if (offset + size > info->fix.smem_len) + if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) + return -EINVAL; + if (size > info->fix.smem_len) + return -EINVAL; + if (offset > info->fix.smem_len - size) return -EINVAL; pos = (unsigned long)info->fix.smem_start + offset; |