lkml.org 
[lkml]   [2004]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: PATCH: tty locking for 2.6.9rc2
From
Date
On Tue, 2004-09-14 at 11:34, Alan Cox wrote:
> This updates the ldisc locking patch for the 2.6.9rc2 changes.

I tried this patch and can't change line disciplines.
The user program waits forever on ioctl(TIOCSETD).
I am going to add printk statements to
find out more.

Looking at your patch I have a question:

Each line discipline has a refcount.
This single refcount is modified by all
entities using that line discipline.

tty_set_ldisc() in tty_io.c waits until the
old ldisc refcount goes to zero before setting
the new ldisc. This seems to cause a problem
in the following situation:

1. two tty instances start with the same ldisc
2. first tty instance holds reference to ldisc
3. second tty instance tries to change ldisc

The second tty instance must wait for the first
tty instance to drop the ldisc reference before
it can change to a new ldisc.

Each tty instance should be able to change
line discipline independant of other tty instances.

Or am I not understanding this correctly?

--
Paul Fulghum
paulkf@microgate.com


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site