[PATCH 4.14 17/95] tee: shm: fix use-after-free via temporarily dropped reference