--- drivers/serial/core.c.orig 2003-09-15 11:49:50.000000000 -0300 +++ drivers/serial/core.c 2003-09-15 11:53:13.000000000 -0300 @@ -1022,7 +1022,7 @@ cprev = cnow; } - current->state = TASK_RUNNING; + __set_current_state(TASK_RUNNING); remove_wait_queue(&state->info->delta_msr_wait, &wait); return ret; @@ -1277,7 +1277,6 @@ if (state->close_delay) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(state->close_delay); - set_current_state(TASK_RUNNING); } } else if (!uart_console(port)) { uart_change_pm(state, 3); @@ -1345,11 +1344,11 @@ set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(char_time); if (signal_pending(current)) - break; + return; if (time_after(jiffies, expire)) - break; + return; } - set_current_state(TASK_RUNNING); /* might not be needed */ + __set_current_state(TASK_RUNNING); /* might not be needed */ } /* @@ -1480,7 +1479,7 @@ if (signal_pending(current)) break; } - set_current_state(TASK_RUNNING); + __set_current_state(TASK_RUNNING); remove_wait_queue(&info->open_wait, &wait); state->count++; @@ -1899,7 +1898,7 @@ set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(10*HZ/1000); } - set_current_state(TASK_RUNNING); + __set_current_state(TASK_RUNNING); ops->shutdown(port); }