Skip to contentSkip to conversation

2.4.17 OOPS in tty code.

DISCUSSION [email protected] 4 participants 5 messages Jan 21, 2002 – Jan 31, 2002

lore
Share & tools
lore
#0 lore raw

Hello All,

Tty device code causes oopses when closing /dev/console and devfs is used. The bug is reproducible on 2.4.17 UML port. The uml arch code however does not seem involved. The problem is, that the tty flip buffer flushing task somehow remains in the tq_timer task queue when the tty struct is freed. When the device is subsequently reopened (or the memory allocated for other purpose), run_task_queue OOPSes when it comes acros the entry, that has it's pointers overwriten.

The bug is regularly triggered in shutdown process (init seems to close and reopen /dev/console).

As it's the user-mode port, I don't have standart OOPS message, but I am willing to provide any backtraces and logs you request.

------------------------------------------------------------------------
- Jan Hudec <[email protected]>

#1 lore raw
Quoted 2 lines · [email protected] said:

Tty device code causes oopses when closing /dev/console and devfs is used. The bug is reproducible on 2.4.17 UML port.

How do you reproduce it?

UML config, command line, a backtrace, etc would be nice.

Jeff

#2 lore raw
Quoted 7 lines · Jeff Dike
Quoted 2 lines · [email protected] said:

Tty device code causes oopses when closing /dev/console and devfs is used. The bug is reproducible on 2.4.17 UML port.

How do you reproduce it?

UML config, command line, a backtrace, etc would be nice.

Furthermore, this was done without applying the latest devfs patch (v199.8 as I write this). Bug reports with old versions of devfs are (and should be) dropped in the bit-bucket, especially considering recent devfs patches have ChangeLog entries which talk about fixing Oopses!

				Regards,

					Richard....
Permanent: [email protected]
Current:   [email protected]
#3 lore raw
In reply to Jeff Dike
Quoted 8 lines · Richard Gooch
Quoted 6 lines · Jeff Dike
Quoted 2 lines · [email protected] said:

Tty device code causes oopses when closing /dev/console and devfs is used. The bug is reproducible on 2.4.17 UML port.

How do you reproduce it?

Quoted 8 lines
Quoted 1 line

UML config, command line, a backtrace, etc would be nice.

Furthermore, this was done without applying the latest devfs patch (v199.8 as I write this). Bug reports with old versions of devfs are (and should be) dropped in the bit-bucket, especially considering recent devfs patches have ChangeLog entries which talk about fixing Oopses!

Jan's report seems to have nothing to do with devfs. It sounds like it's purely a tty-layer thing.

I'd like to see the full backtrace before we bitbucket this one, please.

-

author
#4 lore raw
In reply to [email protected]
Quoted 9 lines

Hello All,

Tty device code causes oopses when closing /dev/console and devfs is used. The bug is reproducible on 2.4.17 UML port. The uml arch code however does not seem involved. The problem is, that the tty flip buffer flushing task somehow remains in the tq_timer task queue when the tty struct is freed. When the device is subsequently reopened (or the memory allocated for other purpose), run_task_queue OOPSes when it comes acros the entry, that has it's pointers overwriten.

Well, I hunted down the bug a bit more. The user-mode code DOES get involved. When /dev/console is open, the pointer is written to vts[line].tty (in console_open), but noone cares to remove it when it's freed. And I don't have any process running on line 0. Just I am not sure, weather the correct way is to avoid freeing the structure (eg. via ref-count) or to remove the pointer in close_console.

--------------------------------------------------------------------------------
- Jan Hudec `Bulb' <[email protected]>