Skip to content

Commit

Permalink
ipmi_ssif: Use interruptible completion for waiting in the thread
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Corey Minyard committed Apr 11, 2015
1 parent ad1ed2a commit d0acf73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d0acf73

Please sign in to comment.