Linux Exec Should Be Less Deadlock Prone In Future Kernels

917

Ongoing work around Linux’s exec() code should make it less deadlock prone in future kernel versions. The current exec functionality within the kernel is “extremely deadlock prone” but Eric Biederman and others have been working to clean up that code and put it in a better state to avoid potential deadlocks. Sent in for the Linux 5.7 kernel was the first part of the exec rework that makes trickier cases easier to spot and the hope is for Linux 5.8 the code to solve exec deadlocks might be ready.

Linus Torvalds pulled the proc/exec changes into the Linux 5.7 kernel but provided feedback that has ignited a lengthy discussion on the topic. Linus noted, “I’ve pulled it, but I’m not entirely happy about some of it…This code is subtle as h*ll, and we’ve had bugs in it, and it has a series of tens of patches to fix them. But that also means that the explanations for the patches should take the subtleties into account, and not gloss over them with things like this. Ok, enough about the explanations. The actual _code_ is kind of odd too.”

[Source: Phoronix]