diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/mem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 672b08e694d0..3191fc8440ab 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -724,6 +724,9 @@ static ssize_t read_zero(struct file * file, char __user * buf, written += chunk - unwritten; if (unwritten) break; + /* Consider changing this to just 'signal_pending()' with lots of testing */ + if (fatal_signal_pending(current)) + return written ? written : -EINTR; buf += chunk; count -= chunk; cond_resched(); |