diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-06-04 01:33:22 +0200 |
---|---|---|
committer | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2013-06-04 12:54:26 +0200 |
commit | 55bb2048feb59f2190f704c2a4df81b557b55c7a (patch) | |
tree | cbb680a60770fb762e5b27c502ad71c2366bf604 /drivers/gpu | |
parent | 3d8b293a4f5042cd9fdc4009a40f6483371cd489 (diff) | |
download | kernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.zip kernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.tar.gz kernel_samsung_smdk4412-55bb2048feb59f2190f704c2a4df81b557b55c7a.tar.bz2 |
smdk4412: bulk update from i9300 update 9
Change-Id: Icd3e7b601f3f4c8b3dcf053fed5819fb7caf5296
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/ion/ion.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index eb81503..14dbefc 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -1034,8 +1034,8 @@ static int ion_share_mmap(struct file *file, struct vm_area_struct *vma) return -EINVAL; } - if ((size > buffer->size) || (size + (vma->vm_pgoff << PAGE_SHIFT) > - buffer->size)) { + if (((vma->vm_pgoff << PAGE_SHIFT) >= buffer->size) || + (size > (buffer->size - (vma->vm_pgoff << PAGE_SHIFT)))) { pr_err("%s: trying to map larger area than handle has available" "\n", __func__); ret = -EINVAL; |