[UPDATE PATCH] net/slip: replace schedule_timeout() with msleep()

Nishanth Aravamudan
2005-01-11T01:03:25Z

> msleep_interruptible-drivers_net_slip.patch

Please consider replacing with the following:

Description: Use msleep() instead of schedule_timeout() to guarantee
the task delays as expected. While the original code does use
TASK_INTERRUPTIBLE, it does not check for signals, so I believe msleep() is more
appropriate.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.10-v/drivers/net/slip.c 2004-12-24 13:35:49.000000000 -0800
+++ 2.6.10/drivers/net/slip.c 2005-01-05 14:23:05.000000000 -0800
@@ -75,6 +75,7 @@
#include <linux/if_arp.h>
#include <linux/if_slip.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include "slip.h"
#ifdef CONFIG_INET
#include <linux/ip.h>
@@ -1395,10 +1396,8 @@ static void __exit slip_exit(void)
/* First of all: check for active disciplines and hangup them.
*/
do {
- if (busy) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
- }
+ if (busy)
+ msleep(100);

busy = 0;
for (i = 0; i < slip_maxdev; i++) {