diff options
author | Xianzhong <b07117@freescale.com> | 2015-01-14 12:45:35 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2015-02-02 14:16:39 +0800 |
commit | 696aea41f01cd58f44b630d1b18d718f17712d58 (patch) | |
tree | 2e4b38ed97b366da19bbf4340a4c71ebeffa22d1 /drivers | |
parent | e953bad30143319290c51019a0555a084db13b0a (diff) |
MGS-304-2 [#1461] Do not leave garbase in outside pointer
this is the enhanced fix for gpu kernel panic issue based on previous:
gpu causes kernel panic when running bonnie++ with suspend/resume.
Date: Jan 14, 2015
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit 5c8f06c77046e7ccca6a389af86431eb67e2b138)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c index 2dbd73d0abe4..2ec98dceed91 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c @@ -1628,10 +1628,6 @@ gckOS_AllocateNonPagedMemory( mdl->addr = addr; - /* Return allocated memory. */ - *Bytes = bytes; - *Physical = (gctPHYS_ADDR) mdl; - if (InUserSpace) { mdlMap = _CreateMdlMap(mdl, _GetProcessID()); @@ -1770,6 +1766,10 @@ gckOS_AllocateNonPagedMemory( MEMORY_UNLOCK(Os); + /* Return allocated memory. */ + *Bytes = bytes; + *Physical = (gctPHYS_ADDR) mdl; + /* Success. */ gcmkFOOTER_ARG("*Bytes=%lu *Physical=0x%X *Logical=0x%X", *Bytes, *Physical, *Logical); @@ -3682,9 +3682,6 @@ gckOS_AllocatePagedMemoryEx( mdl->pagedMem = 1; mdl->contiguous = Flag & gcvALLOC_FLAG_CONTIGUOUS; - /* Return physical address. */ - *Physical = (gctPHYS_ADDR) mdl; - if (Gid != gcvNULL) { *Gid = mdl->gid; @@ -3712,6 +3709,9 @@ gckOS_AllocatePagedMemoryEx( MEMORY_UNLOCK(Os); + /* Return physical address. */ + *Physical = (gctPHYS_ADDR) mdl; + /* Success. */ gcmkFOOTER_ARG("*Physical=0x%X", *Physical); return gcvSTATUS_OK; |