/dev/[k]mem: make reads and writes interruptible
PATCH 1/1 /dev/[k]mem: make reads and writes interruptible
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().
--- drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/mem.c +1 -1
@@ -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); }/*
Signature · 1 line
2.35.1
Quoted 10 lines · Jason A. Donenfeld
In
8619e5bdeee8("/dev/mem: Bail out upon SIGKILL."), /dev/[k]mem became killable, and that commit noted:Theoretically, reading/writing
/dev/memand/dev/kmemcan 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()intosignal_pending().
/dev/kmem is no more. So this should only apply to /dev/mem nowadays.
Signature · 3 lines
Thanks, David / dhildenb
PATCH v2 1/1 /dev/mem: make reads and writes interruptible
In 8619e5bdeee8 ("/dev/mem: Bail out upon SIGKILL."), /dev/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().
---
Changes v1->v2:
- The commit message mentions only /dev/mem now, not /dev/kmem which was removed.
drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/mem.c +1 -1
@@ -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); }/*
Signature · 1 line
2.35.1