On 03/04, Michal Hocko wrote: > > So what would be a legit usecase to drop all signals while explicitly > calling allow_signal? Not sure I understand... Did you mean kthread should use kernel_dequeue rather than flush? Yes, they should do the same if kthread allows a single signal, iow if it calls allow_signal() once. But currently they differ. 1. flush_signal() is faster but we can optimize kernel_dequeue_signal(). 2. kernel_dequeue_signal() does not necessarily clears TIF_SIGPENDING and I think this needs some fixes. Probably klp_patch_pending() is the only problem... Oleg.