From: Corey Minyard Date: Sat, 4 Apr 2015 06:54:26 +0000 (-0500) Subject: ipmi_ssif: Use interruptible completion for waiting in the thread X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0acf734d886ce50bb5103cc75f7ca39f280e8a7;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- 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(