basic/efivars: try re-reading efivars without delay first
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 31 May 2020 10:16:57 +0000 (12:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 2 Jun 2020 15:32:29 +0000 (17:32 +0200)
commiteee9b30af41d2b3a265ad303234ac62bb46b7cd3
tree5cccc43d2dc8836429c95fc08d18e02cd93711a4
parent75f6d5d87e950f62baced48fe9b58828969e3811
basic/efivars: try re-reading efivars without delay first

Quoting https://github.com/systemd/systemd/issues/14828#issuecomment-635212615:

> [kernel uses] msleep_interruptible() and that means when the process receives
> any kind of signal masked or not this will abort with EINTR.  systemd-logind
> gets signals from the TTY layer all the time though.

> Here's what might be happening: while logind reads the EFI stuff it gets a
> series of signals from the TTY layer, which causes the read() to be aborted
> with EINTR, which means logind will wait 50ms and retry. Which will be
> aborted again, and so on, until quite some time passed. If we'd not wait for
> the 50ms otoh we wouldn't wait so long, as then on each signal we'd
> immediately retry again.
src/basic/efivars.c