summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2015-04-04 08:54:26 +0200
committerCorey Minyard <cminyard@mvista.com>2015-04-11 03:51:42 +0200
commitd0acf734d886ce50bb5103cc75f7ca39f280e8a7 (patch)
treec6e1b760a7456e4eb3cf6712e390535fc383c111 /drivers
parentipmi/powernv: Fix minor locking bug (diff)
downloadlinux-d0acf734d886ce50bb5103cc75f7ca39f280e8a7.tar.xz
linux-d0acf734d886ce50bb5103cc75f7ca39f280e8a7.zip
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')
-rw-r--r--drivers/char/ipmi/ipmi_ssif.c8
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(