Files
systemd/test
Martin Pitt bdb302ffe6 core/automount: fail unread queued requests when giving up
When an automount goes away, the tokens we answer are only those we have
read from the pipe. Requests the kernel queued after our last read stayed
blocked: closing the pipe does not wake them, the kernel only notices the
closed pipe and turns the autofs catatonic when yet another request fails
to reach us, and after the lazy unmount no request reaches it anymore. In
the normal stop path that window is one event loop iteration; for an
automount torn down at coldplug it spans the whole reload.

Set the autofs to catatonic state before letting go of it, which fails
everything still queued with ENOENT. Answer the known tokens first:
closing our end of the pipe before that made a racing request flip the
kernel into catatonic mode on its own, which discards the queue and
turns our answers into "token not found" errors.

Signed-off-by: Martin Pitt <martin@amutable.com>
2026-09-11 08:18:43 +02:00
..
…
2019-10-10 00:53:09 +01:00
…