Re: [patch 0/3] Re: tty contention resulting from tty_open_by_device export

From: Alan Cox
Date: Mon Jul 17 2017 - 18:05:37 EST



> Sure. I can fix the tty->count mismatch based on Alan's suggestion. However I don't understand why the exclusivity flag should belong to tty_port and not tty_struct. It will be good to know why.

We are trying to move all the flags that we can and structs into the
tty_port, except any that are used internally within the struct tty
level code. The main reason for this is to make the object lifetimes and
locking simpler - because the tty_port lasts for the time the hardware is
present.

Alan