diff options
author | Michael Gill <michael.gill@xilinx.com> | 2017-03-31 11:53:36 -0700 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2017-04-06 08:58:28 +0200 |
commit | f954dbf3ccf28a92b9c6698f7a9cc7016b943b12 (patch) | |
tree | fa3a8dadccfd99f73d924ea0fed69fa8e202ca2f | |
parent | 6199cfdc5999813c201382b638cc4af190098cfb (diff) | |
download | linux-f954dbf3ccf28a92b9c6698f7a9cc7016b943b12.tar.gz |
staging: apf: Fix buffer ID overflow
This moves the hard upper bound on buffers in the apf driver
from 256 to 64K
Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | drivers/staging/apf/xlnk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/apf/xlnk.c b/drivers/staging/apf/xlnk.c index 4654265d2ed842..e89c7bd52a9cd5 100644 --- a/drivers/staging/apf/xlnk.c +++ b/drivers/staging/apf/xlnk.c @@ -423,7 +423,6 @@ static int xlnk_allocbuf(unsigned int len, unsigned int cacheable) spin_unlock(&xlnk_buf_lock); if (id <= 0 || id >= XLNK_BUF_POOL_SIZE) { - pr_err("No id could be found in range\n"); return -ENOMEM; } @@ -1729,7 +1728,7 @@ static int xlnk_mmap(struct file *filp, struct vm_area_struct *vma) int bufid; int status; - bufid = vma->vm_pgoff >> (24 - PAGE_SHIFT); + bufid = vma->vm_pgoff >> (16 - PAGE_SHIFT); if (bufid == 0) status = remap_pfn_range(vma, vma->vm_start, |