mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] /dev/[k]mem: make reads and writes interruptible
@ 2022-04-07  0:13 Jason A. Donenfeld
  2022-04-07  8:14 ` David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-04-07  0:13 UTC (permalink / raw)
  To: linux-kernel, gregkh; +Cc: Jason A. Donenfeld, Tetsuo Handa

In 8619e5bdeee8 ("/dev/mem: Bail out upon SIGKILL."), /dev/[k]mem became
killable, and that commit noted:

  Theoretically, reading/writing /dev/mem and /dev/kmem can become
  "interruptible". But this patch chose "killable". Future patch will
  make them "interruptible" so that we can revert to "killable" if
  some program regressed.

So now we take the next step in making it "interruptible", by changing
fatal_signal_pending() into signal_pending().

Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 drivers/char/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index cc296f0823bd..84ca98ed1dad 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -101,7 +101,7 @@ static inline bool should_stop_iteration(void)
 {
 	if (need_resched())
 		cond_resched();
-	return fatal_signal_pending(current);
+	return signal_pending(current);
 }
 
 /*
-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-07 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  0:13 [PATCH] /dev/[k]mem: make reads and writes interruptible Jason A. Donenfeld
2022-04-07  8:14 ` David Hildenbrand
2022-04-07 12:26   ` [PATCH v2] /dev/mem: " Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®