Re: [patch 12/26] char/istallion: replace schedule_timeout() withmsleep_interruptible()

From: Andrew Morton
Date: Thu Sep 23 2004 - 17:55:20 EST


janitor@xxxxxxxxxxxxxx wrote:
>
> @@ -2504,7 +2484,8 @@ static void stli_waituntilsent(struct tt
> while (test_bit(ST_TXBUSY, &portp->state)) {
> if (signal_pending(current))
> break;
> - stli_delay(2);
> + set_current_state(TASK_INTERRUPTIBLE);
> + schedule_timeout(2);
> if (time_after_eq(jiffies, tend))
> break;
> }

I'll replace this with msleep_interruptible(20), which is presumably what
the driver was trying to do originally.

Again, all of these delays become accidental busyloops if the calling task
has a signal pending. Sigh. Probably they should all be using
TASK_UNINTERRUPTIBLE.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/