linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

tee: fix unbalanced context refcount in register shm from fd #60

Closed etienne-lms closed 6 years ago

etienne-lms commented 6 years ago

Successful registration of a memory reference in the scope of a TEE content must increase the context refcount. This change adds this missing refcount increase.

The context refcount is already decremented when such shm reference is freed by its owner, in tee_shm_release().

Fixes: 9f9806e01ee7 ("tee: new ioctl to a register tee_shm from a dmabuf file descriptor")

Signed-off-by: Etienne Carriere etienne.carriere@linaro.org

jenswi-linaro commented 6 years ago

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

etienne-lms commented 6 years ago

tags applied.

vchong commented 5 years ago

Correction in the commit message: Fixes: 9f9806e ("tee: new ioctl to a register tee_shm from a dmabuf file descriptor") should be Fixes: 28f2ad9c ("tee: new ioctl to a register tee_shm from a dmabuf file descriptor")