aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorsakindia123 <sa6915@gmail.com>2013-06-14 05:02:38 +0100
committersakindia123 <sa6915@gmail.com>2013-06-14 05:02:38 +0100
commit83e756cbc3fc1689d40567b71511adc1089f85e0 (patch)
tree0d223e10f94cf10500d570e50a5296660bff0793 /sound
parente25020d0b5430c86778e3c2bf3e5050e96db0d77 (diff)
downloadkernel_samsung_smdk4412-83e756cbc3fc1689d40567b71511adc1089f85e0.zip
kernel_samsung_smdk4412-83e756cbc3fc1689d40567b71511adc1089f85e0.tar.gz
kernel_samsung_smdk4412-83e756cbc3fc1689d40567b71511adc1089f85e0.tar.bz2
Samsung i9300 Update 10
Change-Id: I549efadb9464c7f0e4248c31f1f8bff55ffed458
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/srp_alp/srp_alp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/samsung/srp_alp/srp_alp.c b/sound/soc/samsung/srp_alp/srp_alp.c
index 900dfff..004b0cc 100644
--- a/sound/soc/samsung/srp_alp/srp_alp.c
+++ b/sound/soc/samsung/srp_alp/srp_alp.c
@@ -736,8 +736,14 @@ static int srp_release(struct inode *inode, struct file *file)
static int srp_mmap(struct file *filep, struct vm_area_struct *vma)
{
unsigned long size = vma->vm_end - vma->vm_start;
+ unsigned long size_max;
unsigned int pfn;
+ size_max = (srp.obuf_info.mmapped_size + PAGE_SIZE - 1) &
+ ~(PAGE_SIZE - 1);
+ if (size > size_max)
+ return -EINVAL;
+
vma->vm_flags |= VM_IO;
vma->vm_flags |= VM_RESERVED;
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);