Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 22 Aug 2019 14:29:19 -0700 | Subject | Re: [PATCH] /dev/mem: Bail out upon SIGKILL when reading memory. |
| |
On Tue, Aug 20, 2019 at 3:07 PM Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote: > > - while (count > 0) { > + while (count > 0 && !fatal_signal_pending(current)) {
Please just use the normal pattern of doing
if (fatal_signal_pending(current)) return -EINTR;
inside the loop instead.
(Ok, in this case I think it wants
err = -EINTR; if (fatal_signal_pending(current)) break;
instead, but the point is to make it look like signal handling, just with the special "fatal signals can sometimes be handled even when regular signals might not make it through".
Linus
| |