[PATCH 4.16 025/110] tee: shm: fix use-after-free via temporarily dropped reference