projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8af1347
)
ion: add alignment check to carveout heap
author
Colin Cross
<ccross@android.com>
Tue, 26 Nov 2013 21:43:29 +0000
(13:43 -0800)
committer
Colin Cross
<ccross@android.com>
Thu, 12 Dec 2013 23:27:08 +0000
(15:27 -0800)
Change-Id: I25c752b3eacb48cccea5be2df319634b3affd331
Signed-off-by: Colin Cross <ccross@android.com>
drivers/staging/android/ion/ion_carveout_heap.c
patch
|
blob
|
history
diff --git
a/drivers/staging/android/ion/ion_carveout_heap.c
b/drivers/staging/android/ion/ion_carveout_heap.c
index ed2b7ae709644b82569266218165aba2e4b8e04b..128ee115e60e8a4d63e1d0899394953e776434b6 100644
(file)
--- a/
drivers/staging/android/ion/ion_carveout_heap.c
+++ b/
drivers/staging/android/ion/ion_carveout_heap.c
@@
-70,6
+70,9
@@
static int ion_carveout_heap_allocate(struct ion_heap *heap,
unsigned long size, unsigned long align,
unsigned long flags)
{
+ if (align > PAGE_SIZE)
+ return -EINVAL;
+
buffer->priv_phys = ion_carveout_allocate(heap, size, align);
return buffer->priv_phys == ION_CARVEOUT_ALLOCATE_FAIL ? -ENOMEM : 0;
}