[PATCH backport for 4.14] tee: handle lookup of shm with reference count 0