lkml.org 
[lkml]   [2012]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [uml-devel] /sys/class/tty/tty0/active?
From
On Fri, Jan 27, 2012 at 12:51 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> UML's console driver (arch/um/drivers/line.c) implements tty_operations.
>> The crash happens because the tty subsystem calls the driver's close()
>> function and later
>> write_room() or chars_in_buffer().
>>
>> write_room() and chars_in_buffer() fail badly because close() already
>> cleaned up the driver's private data...
>
> You don't want to do that.

That's what i thought.

>> Greg, is UML's assumption wrong that after closing the tty no call to
>> write_room() or chars_in_buffer() can happen?
>> I have no idea why systemd is able to trigger this, UML's console
>> driver is old and has always worked quite well.
>
> It's always been untrue but it's even more untrue nowdays. The tty layer
> objects are refcounted, and the code has had significant rewrites. line.c
> hidden away in uml hasn't been updated.
>
> I added a comment about 3 years ago pointing out another older change
> that was needed and that wasn't acted on either..
>
> Take a look at how all the other tty drivers use tty_port, how the ioctls
> have been supposed to work for the past few years and the callback
> changes, then use them.

Can you recommend a well-written driver?

--
Thanks,
//richard


\
 
 \ /
  Last update: 2012-01-27 13:07    [W:0.493 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site