On Wed, 31 May 2000, Peter E. Berger wrote:
> sure that this problem affects the other usb-serial drivers under 2.3.X
> and 2.4.X kernels too. We're just merging in some other changes and
2.2.15-pre5 and later too if the cause of the hangs is that
TASK_RUNNING/TASK_INTERRUPTIBLE ping-pong.
2.2.15pre5
o Fix cases where things write to user space
in TASK_INTERRUPTIBLE as well as some other
odd quirks (Ben LaHaise et al)
I believe this was the point:
void ___wait_on_page(struct page *page)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
add_wait_queue(&page->wait, &wait);
do {
sync_page(page);
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (!PageLocked(page))
break;
schedule();
} while (PageLocked(page));
tsk->state = TASK_RUNNING;
remove_wait_queue(&page->wait, &wait);
}
Hmm. task state is set UNINTERRUPTIBLE explicitly before going to schedule().
Makes me wonder why it is then set RUNNING before accessing user space
in n_tty.c.
What are the side effects if we store the original tsk->state before
entering do-while loop and restore it afterwards? That wouldn't remove
the races though, would it?
Btw. why for one we haven't seen any reports from other serial devices?
They behave exactly the same - calling wakeup from an interrupt.
Note to Alan, changes to es1370 look at a glance problematic in this
respect too. I believe there are recent bug reports which fit the bill.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]