diff options
author | Corey Minyard <cminyard@mvista.com> | 2015-04-04 09:54:26 +0300 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2015-04-11 04:51:42 +0300 |
commit | d0acf734d886ce50bb5103cc75f7ca39f280e8a7 (patch) | |
tree | c6e1b760a7456e4eb3cf6712e390535fc383c111 /drivers/char | |
parent | ad1ed2a9dd4c435d6a3ce470211db9a8d107c3e0 (diff) | |
download | linux-d0acf734d886ce50bb5103cc75f7ca39f280e8a7.tar.xz |
ipmi_ssif: Use interruptible completion for waiting in the thread
The code was using an normal completion, but that caused stuck
task errors after a while. Use an interruptible one to avoid that.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ipmi/ipmi_ssif.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index f6e378dac5f5..f40e3bd2c69c 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -468,11 +468,13 @@ static int ipmi_ssif_thread(void *data) int result; /* Wait for something to do */ - wait_for_completion(&ssif_info->wake_thread); - init_completion(&ssif_info->wake_thread); - + result = wait_for_completion_interruptible( + &ssif_info->wake_thread); if (ssif_info->stopping) break; + if (result == -ERESTARTSYS) + continue; + init_completion(&ssif_info->wake_thread); if (ssif_info->i2c_read_write == I2C_SMBUS_WRITE) { result = i2c_smbus_write_block_data( |