Closed rmetrich closed 9 months ago
Thanks for the patch. Renaming things that don't need to be introduces more code churn. (does signum really need renaming, etc?) But I have run across this problem developing the code and yes, if it can be fixed should make people happier. But this also goes to an older discussion of should fapolicyd fail open or closed?
Thanks for the patch. Renaming things that don't need to be introduces more code churn. (does signum really need renaming, etc?) But I have run across this problem developing the code and yes, if it can be fixed should make people happier. But this also goes to an older discussion of should fapolicyd fail open or closed?
I can remove this renaming of signum, that was just be to aligned with the other handlers actually
OK, I'll merge it. It's best to separate bug fix and cosmetic fixes for bisecting purposes.
If for some reason, fapolicyd raises or receives a deadly signal, such as SIGBUS, the kernel task spawning the coredump handler (e.g. systemd-coredump) will hang waiting for fapolicyd to acknowledge the execution, which cannot happen since fapolicyd itself is dying.
This patch fixes the issue through unregistering from fanotify.
Example of deadlock without this patch: