linux_dsm_epyc7002/drivers/char/ip2
Alan Cox c65c9bc3ef tty: rewrite the ldisc locking
There are several pretty much unfixable races in the old ldisc code, especially
with respect to pty behaviour and also to hangup. It's easier to rewrite the
code than simply try and patch it up.

This patch
- splits the ldisc from the tty (so we will be able to refcount it more cleanly
  later)
- introduces a mutex lock for ldisc changing on an active device
- fixes the complete mess that hangup caused
- implements hopefully correct setldisc/close/hangup locking

There are still some problems around pty pairs that have always been there but
at least it is now possible to understand the code and fix further problems.

This fixes the following known bugs
- hang up can leak ldisc references
- hang up may not call open/close on ldisc in a matched way
- pty/tty pairs can deadlock during an ldisc change
- reading the ldisc proc files can cause every ldisc to be loaded

and probably a few other of the mysterious ldisc race reports.

I'm sure it also adds the odd new one.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11 08:51:01 -07:00
..
i2cmd.c [PATCH] ip2main.c warning fixes 2006-02-03 08:32:10 -08:00
i2cmd.h [PATCH] char: ip2 remove broken macro 2006-12-07 08:39:43 -08:00
i2ellis.c ip2: init/deinit cleanup 2008-10-13 09:51:39 -07:00
i2ellis.h ip2: init/deinit cleanup 2008-10-13 09:51:39 -07:00
i2hw.h Char: ip2, macros cleanup 2008-04-30 08:29:44 -07:00
i2lib.c tty: rewrite the ldisc locking 2009-06-11 08:51:01 -07:00
i2lib.h [PATCH] i2Output always takes kernel data now 2006-10-11 11:17:07 -07:00
i2pack.h [PATCH] Fix pragma packing in ip2 driver 2006-01-04 13:55:35 -08:00
ip2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip2ioctl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip2main.c tty: rewrite the ldisc locking 2009-06-11 08:51:01 -07:00
ip2trace.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip2types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile Char: merge ip2main and ip2base 2008-10-13 09:51:39 -07:00