mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 16:50:05 +00:00
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>
This commit is contained in:
parent
ad1ed2a9dd
commit
d0acf734d8
@ -468,11 +468,13 @@ static int ipmi_ssif_thread(void *data)
|
|||||||
int result;
|
int result;
|
||||||
|
|
||||||
/* Wait for something to do */
|
/* Wait for something to do */
|
||||||
wait_for_completion(&ssif_info->wake_thread);
|
result = wait_for_completion_interruptible(
|
||||||
init_completion(&ssif_info->wake_thread);
|
&ssif_info->wake_thread);
|
||||||
|
|
||||||
if (ssif_info->stopping)
|
if (ssif_info->stopping)
|
||||||
break;
|
break;
|
||||||
|
if (result == -ERESTARTSYS)
|
||||||
|
continue;
|
||||||
|
init_completion(&ssif_info->wake_thread);
|
||||||
|
|
||||||
if (ssif_info->i2c_read_write == I2C_SMBUS_WRITE) {
|
if (ssif_info->i2c_read_write == I2C_SMBUS_WRITE) {
|
||||||
result = i2c_smbus_write_block_data(
|
result = i2c_smbus_write_block_data(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user