sess_from_si() does this via the owner (struct task). It works because all stream ints belong to a task nowadays.