]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
geli: fix a livelock during panic
authorasomers <asomers@FreeBSD.org>
Wed, 27 May 2020 19:13:26 +0000 (19:13 +0000)
committerasomers <asomers@FreeBSD.org>
Wed, 27 May 2020 19:13:26 +0000 (19:13 +0000)
commitd10d581667ba58ed6953eb404936236ee0e60b21
treed196a4ca62f31ef0bbf241854aaaba07b09ce8ba
parent9d6aa4bb8f8fef23584a34878e45b65190f6310e
geli: fix a livelock during panic

During any kind of shutdown, kern_reboot calls geli's pre_sync event hook,
which tries to destroy all unused geli devices. But during a panic, geli
can't destroy any devices, because the scheduler is stopped, so it can't
switch threads. A livelock results, and the system never dumps core.

This commit fixes the problem by refusing to destroy any devices during
panic, used or otherwise.

PR: 246207
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D24697
sys/geom/eli/g_eli.c