Fix up some session-related races in devfs.

One was introduced with r272596, the rest was there to begin with.

Noted by: jhb