Skip to content

Commit 9930702

Browse files
committed
ipmi_watchdog: Fix read syscall not responding to signals during sleep
Read syscall cannot response to sigals when data_to_read remains at 0 and the while loop cannot break. Check signal_pending in the loop. Reported-by: Zhen Ni <zhen.ni@easystack.cn> Message-Id: <20230517085412.367022-1-zhen.ni@easystack.cn> Signed-off-by: Corey Minyard <minyard@acm.org>
1 parent 4d6d4c7 commit 9930702

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/char/ipmi/ipmi_watchdog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ static ssize_t ipmi_read(struct file *file,
802802

803803
init_waitqueue_entry(&wait, current);
804804
add_wait_queue(&read_q, &wait);
805-
while (!data_to_read) {
805+
while (!data_to_read && !signal_pending(current)) {
806806
set_current_state(TASK_INTERRUPTIBLE);
807807
spin_unlock_irq(&ipmi_read_lock);
808808
schedule();

0 commit comments

Comments
 (0)