Hi Qihang,
On Wed, May 6, 2026 at 4:18 AM Qihang q.h.hack.winter@gmail.com wrote:
Hi Jens, Sumit,
While reworking this, I noticed that there may be two slightly different cleanup issues involved here.
One appears to be in tee_ioctl_supp_recv() itself. Another may be in a qcomtee-specific error path where MEMREF references can already have been acquired before the backend rejects the parameters.
I am not entirely sure where you would prefer the boundary between the core fix and any backend-specific fix to be.
Would you prefer that I keep the current patch strictly focused on the tee_ioctl_supp_recv() cleanup path first, and handle any qcomtee-side issue separately if needed?
qcomtee-specific changes should preferably go into a separate patch. In this case, I suspect the fix is to add a similar tee_shm_put() as we have in supp_check_recv_params() in drivers/tee/optee/supp.c.
Cheers, Jens