f82927ad65
For userptr, after taking aperture lock, decrease registration_count and ensure object registration_count equal to 0 to release KFD and thunk object. Move decrementing of registration count from fmm_deregister_memory into __fmm_release to avoid a race condition when dropping the aperture lock in fmm_deregister_memory. Change-Id: I5381fa6b8a77a1516af2554e5174e91969c338c4 Signed-off-by: Philip Yang <Philip.Yang@amd.com>