diff options
author | Loren Huang <b02279@freescale.com> | 2014-04-21 11:04:36 +0800 |
---|---|---|
committer | Loren Huang <b02279@freescale.com> | 2014-04-21 11:09:35 +0800 |
commit | 02364c15d630f8d045a4120a4a864c1ca8bc0cb3 (patch) | |
tree | 4942f07b843ca809b0350ee191cd47e0e6a179ae | |
parent | f721c956d46685645269933c8a71f2dbccfb7e58 (diff) |
ENGR00292154-13 [#1141]Fix Kernel panic when contiguous memory used up
-When allocation failed, the node will be null.
node->Virtual.type access will cause kernel panic
when forceContiguous is enabled.
Date: Apr 21,2014
Signed-off-by: Loren Huang <b02279@freescale.com>
Acked-by: Shawn Guo
(cherry picked from commit 9b5b98b69201135fef0500907ecb3320b128ef0f)
-rw-r--r-- | drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c index 365fe5b28ff6..59b35bbaface 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c +++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c @@ -815,8 +815,8 @@ _AllocateMemory_Retry: if(node) { bytes = node->Virtual.bytes; + node->Virtual.type = Type; } - node->Virtual.type = Type; /* Success. */ break; @@ -842,8 +842,8 @@ _AllocateMemory_Retry: if(node) { bytes = node->Virtual.bytes; + node->Virtual.type = Type; } - node->Virtual.type = Type; /* Memory allocated. */ if(node && forceContiguous == gcvTRUE) |