[PATCH 1/1] drivers/acpi/acpi_ipmi.c: Set state to TASK_INTERRUPTIBLE in ipmi_flush_tx_msg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Sifram Rajas <Sifram Rajas sifram.rajas@xxxxxxxxx>

The intent of the loop in ipmi_flush_tx_msg seems to be to wait
for 1 milllisecond for a count of 100. However, if we do not set the
current task's state to TASK_INTERRUPTIBLE, then this will amount
to a normal schedule which might not wait for 1 millisecond.

Signed-off-by: Sifram Rajas <Sifram Rajas sifram.rajas@xxxxxxxxx>
---
 drivers/acpi/acpi_ipmi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/acpi_ipmi.c b/drivers/acpi/acpi_ipmi.c
index f40acef..74eed35 100644
--- a/drivers/acpi/acpi_ipmi.c
+++ b/drivers/acpi/acpi_ipmi.c
@@ -230,6 +230,7 @@ static void ipmi_flush_tx_msg(struct acpi_ipmi_device *ipmi)
 	while (count--) {
 		if (list_empty(&ipmi->tx_msg_list))
 			break;
+		__set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(1);
 	}
 	if (!list_empty(&ipmi->tx_msg_list))
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux