linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

[OPTEE Driver] memory leak in tee_shm.c #86

Open omasse-linaro opened 3 years ago

omasse-linaro commented 3 years ago

Hello,

I find a memory leak in optee driver introduced by the following commit: https://github.com/linaro-swg/linux/commit/9d5c773e6ff2250f39bff8b311127bf75ff3c39d

the driver do not release correctly a dma_buf_attachment structure when releasing a file descriptor shared memory. PFA a patch to fix the issue.

0001-MMIOT-674-Add-missing-DMA-Buf-detach.zip

BR / Olivier

jforissier commented 3 years ago

Hi Olivier,

Thanks for the patch. Which branch did you use? It doesn't apply on top of the current optee branch (at commit 436d15c681f4).

omasse-linaro commented 3 years ago

Sorry, the patch is on linux 4.14 branch. PFA a rebased one on https://github.com/linaro-swg/linux/commit/436d15c681f41d15ff26adc5d6bc29c757188185

0001-Add-missing-DMA-Buf-detach.zip

jforissier commented 3 years ago

Thanks. I have opened #87 to collect review comments and then merge into our optee branch.