An error occurred fetching the project authors.
- 24 Aug, 2004 1 commit
-
-
Alexander Viro authored
If tty_open() fails for a normal serial device, we end up doing cleanups that should only happen for failed open of /dev/ptmx. The results are not pretty - devpts et.al. end up very confused. That's what gave problems with ptmx. This splits ptmx file_operations from the normal case and cleans up both tty_open() and (new) ptmx_open(). Survived serious beating.
-
- 10 Aug, 2004 1 commit
-
-
Olaf Hering authored
You missed that one last year. export the legacy pty/tty device nodes via sysfs, so udev has a chance to create them if /dev is in tmpfs. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
- 07 Aug, 2004 1 commit
-
-
Linus Torvalds authored
unnecessary tests at read/write time.
-
- 28 Jul, 2004 1 commit
-
-
Vladimir B. Savkin authored
I noticed that our PPPoE/PPtP access concentrator leaks pty devices. When all 4096 indices are leaked, there was need to reboot it. The following patch fixes this problem. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
- 29 Jun, 2004 1 commit
-
-
Russell King authored
[This patch series has also been separately sent to the architecture maintainers] Add console_device() to return the console tty driver structure and the index. Acquire the console lock while scanning the list of console drivers to protect us against console driver list manipulations. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
- 18 Jun, 2004 1 commit
-
-
H. Peter Anvin authored
(With Andrew Morton). The current dynamic pty allocation scheme has a few problems: - pty numbers grow to be very large, causing wtmp file bloat. - Seems to break libc5 and some old applications So change it to do first-fit. An IDR tree is used to provide a logarithmic-time search. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
- 30 May, 2004 1 commit
-
-
Alexander Viro authored
tty_io.c annotated
-
- 10 May, 2004 1 commit
-
-
Andrew Morton authored
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> ldisc close can race with the flush_to_ldisc workqueue. This patch fixes it by killing the workqueue first.
-
- 12 Apr, 2004 3 commits
-
-
Andrew Morton authored
From: Roland McGrath <roland@redhat.com> This patch moves all the fields relating to job control from task_struct to signal_struct, so that all this info is properly per-process rather than being per-thread.
-
Andrew Morton authored
The race is that con_close() can sleep, and drops the BKL while tty->count==1. But another thread can come into init_dev() and will take a new ref against the tty and start using it. But con_close() doesn't notice that new ref and proceeds to null out tty->driver_data while someone else is using the resurrected tty. So the patch serialises con_close() against init_dev() with tty_sem. Here's a test app which reproduced the oops instantly on 2-way. It realy needs to be run against all tty-capable devices. /* * Run this against a tty which nobody currently has open, such as /dev/tty9 */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kd.h> void doit(char *filename) { int fd,x; fd = open(filename, O_RDWR); if (fd < 0) { perror("open"); exit(1); } ioctl(fd, KDKBDREP, &x); close(fd); } main(int argc, char *argv[]) { char *filename = argv[1]; for ( ; ; ) doit(filename); }
-
Andrew Morton authored
Remove the down_tty_sem() and up_tty_sem() and replace them with open-coded up() and down(). This is an equivalent transformation. I assume these functions were created to open the possibility of per-tty semaphores at some time in the future. But the code which is protected by this lock deals with two tty's at the same time, and the next patch will need to release the lock after the tty has been destroyed.
-
- 15 Mar, 2004 1 commit
-
-
Andrew Morton authored
Against Jon's cdev stuff
-
- 12 Mar, 2004 3 commits
-
-
Greg Kroah-Hartman authored
-
Jonathan Corbet authored
The existing cdev interface requires users to deal with the embedded kobject in two places: - The kobject name field must be set before adding the cdev, and - Should cdev_add() fail, a call to kobject_put() is required. IMO, this exposure of the embedded kobject makes the interface more brittle and harder to understand. It's also unnecessary. With the removal of /sys/cdev, a call to cdev_del() will nicely replace kobject_put(), and the name setting is easily wrapped. This is against 2.6.4, but depends on the /sys/cdev removal patch.
-
Jonathan Corbet authored
This is the first of two patches designed to make life easier for authors of device driver books - and, with luck, driver authors too. /sys/cdev is, according to Al, a mistake which was never really meant to exist. I believe nothing uses it currently - there isn't a whole lot there to use. Its existence takes up system resources, and also requires drivers to deal with the cdev's embedded kobject in their failure paths. The following patch (against 2.6.4) makes it all go away. OK, almost all. We have to keep (but not register) cdev_subsys because it's rwsem is needed to control access to cdev_map.
-
- 10 Mar, 2004 1 commit
-
-
Andrew Morton authored
From: William Lee Irwin III <wli@holomorphy.com> Remember to invalidate the task->tty of threads, otherwise prod_pid_stat() later stumbles over the dangling pointers and crashes.
-
- 22 Feb, 2004 1 commit
-
-
Andrew Morton authored
From: "H. Peter Anvin" <hpa@transmeta.com> Remove the limit of 2048 pty's - allocate them on demand up to the 12:20 dev_t limit: a million.
-
- 06 Feb, 2004 1 commit
-
-
Jonathan Corbet authored
To recap my argument: the current cdev implementation keeps an uncounted reference to every cdev in cdev_map. Creators of cdevs must know to call cdev_unmap() with the same arguments they passed to cdev_add() before releasing the device, or that reference will remain and will oops the kernel should user space attempt to open the (missing) device. It's an easy mistake to make, and, IMO, entirely unnecessary; the cdev code should be able to do its own bookkeeping.
-
- 04 Feb, 2004 1 commit
-
-
Andrew Morton authored
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> - Make sure that all console operations are approriately protected under console_sem. - Adds checks to make sure that people are taking console_sem when it is expected to be held.
-
- 19 Jan, 2004 1 commit
-
-
Greg Kroah-Hartman authored
This patch ports the existing tty class support to the class_simple interface, saving a lot of code in the process.
-
- 22 Oct, 2003 1 commit
-
-
Alexander Viro authored
do_tty_hangup() does fput() on redirect struct file too early - it could've been the only holder of tty_struct we are working with and in that case we'll end up freeing it from fput() and then both reading and modifying kfreed memory.
-
- 09 Oct, 2003 1 commit
-
-
Linus Torvalds authored
cause NULL pointer references in /proc. Moreover, it's questionable whether the whole thing makes sense at all. Per-thread state is good. Cset exclude: davem@nuts.ninka.net|ChangeSet|20031005193942|01097 Cset exclude: akpm@osdl.org[torvalds]|ChangeSet|20031005180420|42200 Cset exclude: akpm@osdl.org[torvalds]|ChangeSet|20031005180411|42211
-
- 07 Oct, 2003 1 commit
-
-
Arnaldo Carvalho de Melo authored
-
- 05 Oct, 2003 1 commit
-
-
Andrew Morton authored
From: Roland McGrath <roland@redhat.com> This patch completes what was started with the `process_group' accessor function, moving all the job control-related fields from task_struct into signal_struct and using process_foo accessor functions to read them. All these things are per-process in POSIX, none per-thread. Off hand it's hard to come up with the hairy MT scenarios in which the existing code would do insane things, but trust me, they're there. At any rate, all the uses being done via inline accessor functions now has got to be all good. I did a "make allyesconfig" build and caught the few random drivers and whatnot that referred to these fields. I was surprised to find how few references to ->tty there really were to fix up. I'm sure there will be a few more fixups needed in non-x86 code. The only actual testing of a running kernel with these patches I've done is on my normal minimal x86 config. Everything works fine as it did before as far as I can tell. One issue that may be of concern is the lack of any locking on multiple threads diddling these fields. I don't think it really matters, though there might be some obscure races that could produce inconsistent job control results. Nothing shattering, I'm sure; probably only something like a multi-threaded program calling setsid while its other threads do tty i/o, which never happens in reality. This is the same situation we get by using ->group_leader->foo without other synchronization, which seemed to be the trend and noone was worried about it.
-
- 23 Sep, 2003 2 commits
-
-
Andrew Morton authored
From: Christoph Hellwig <hch@lst.de> All drivers that compile on ppc with CONFIG_ISA set (= all but some m68-only drivers), I looked at the compile warnings very closely and there are no new warnings or even errors this time :) drivers/char/Makefile needed to be reordered big time to keep the intialization order the same.
-
Alexander Viro authored
tty->device had been used only in a couple of places and can be calculated by tty->index and tty->driver. Field removed, its users switched to static inline dev_t tty_devnum(tty).
-
- 21 Sep, 2003 2 commits
-
-
Andrew Morton authored
From: Christoph Hellwig <hch@lst.de> keeping init order the same..
-
Andrew Morton authored
From: Jeremy Fitzhardinge <jeremy@goop.org> I'm resending my patch to fix this problem. To recap: every task_struct has its own copy of the thread group's pgrp. Only the thread group leader is allowed to change the tgrp's pgrp, but it only updates its own copy of pgrp, while all the other threads in the tgrp use the old value they inherited on creation. This patch simply updates all the other thread's pgrp when the tgrp leader changes pgrp. Ulrich has already expressed reservations about this patch since it is (1) incomplete (it doesn't cover the case of other ids which have similar problems), (2) racy (it doesn't synchronize with other threads looking at the task pgrp, so they could see an inconsistent view) and (3) slow (it takes linear time with respect to the number of threads in the tgrp). My reaction is that (1) it fixes the actual bug I'm encountering in a real program. (2) doesn't really matter for pgrp, since it is mostly an issue with respect to the terminal job-control code (which is even more broken without this patch. Regarding (3), I think there are very few programs which have a large number of threads which change process group id on a regular basis (a heavily multi-threaded job-control shell?). Ulrich also said he has a (proposed?) much better fix, which I've been looking forward to. I'm submitting this patch as a stop-gap fix for a real bug, and perhaps to prompt the improved patch. An alternative fix, at least for pgrp, is to change all references to ->pgrp to group_leader->pgrp. This may be sufficient on its own, but it would be a reasonably intrusive patch (I count 95 instances in 32 files in the 2.6.0-test3-mm3 tree).
-
- 05 Sep, 2003 4 commits
-
-
Alexander Viro authored
the last kdev_t object is gone; ->i_rdev switched to dev_t.
-
Alexander Viro authored
tty redirect handling sanitized. Such ttys (/dev/tty and /dev/console) get a different file_operations; its ->write() handles redirects; checks for file->f_op == &tty_fops updated, checks for major:minor being that of a redirector replaced with check for ->f_op->write value. Piece of code in tty_io.c that had been #if 0 since 0.99<something> had been finally put out of its misery. kdev_val() is gone.
-
Alexander Viro authored
cdevname() killed, there was only one remaining user (tty_paranoia_check()) and in that case cdevname() was worse than plain major:minor (basically, it's "you've got corrupted inode that was supposed to belong to tty device; here's what I'd found in ->i_rdev")
-
Alexander Viro authored
misc trivial cleanups
-
- 31 Aug, 2003 2 commits
-
-
Andrew Morton authored
Ancient bug, reported by Hiroshi Inoue <inoueh@uranus.dti.ne.jp>: 1. login to tty2 (not tty1) 2. start kon (Kanji cONsole emulator, console which support Japanese characters) 3. exit kon 4. logout It oopses in the debugging function check_tty_count(), walking a list_head which has been list_del()'d. Call trace is: #0 check_tty_count (tty=0x10d42000, routine=0xc817b00 ".paths") at include/asm/processor.h:583 #1 0x022c6c00 in do_tty_hangup (data=0x10d42000) at drivers/char/tty_io.c:426 #2 0x022c6f60 in tty_vhangup (tty=0xc817b00) at drivers/char/tty_io.c:536 #3 0x022c6fcc in disassociate_ctty (on_exit=1) at drivers/char/tty_io.c:574 #4 0x02127aee in do_exit (code=0) at kernel/exit.c:718 #5 0x02127caa in do_group_exit (exit_code=0) at kernel/exit.c:796 #6 0x02127cbc in sys_exit_group (error_code=0) at kernel/exit.c:807 The tty refcount is zero, so everything seems consistent and sensible. The fix just uses list_del_init() on that list_head. Heaven knows what the locking for tty->count is though. Some bizarre mixture of BKL, tty_sem and nothing at all.
-
Alexander Viro authored
tty_paranoia_check() switched from kdev_t to struct inode.
-
- 01 Aug, 2003 1 commit
-
-
Andrew Morton authored
From: Greg KH <greg@kroah.com> Different architectures use different types for dev_t, so it is hard to print dev_t variables out correctly. Quite a lot of code is wrong now, and will continue to be wrong when 64-bit dev_t is merged. Greg's patch introduces a little wrapper function which can be used to safely form a dev_t for printing. I added the format_dev_t function as well, which is needed for direct insertion in a printk statement.
-
- 29 Jul, 2003 1 commit
-
-
Samuel Thibault authored
-
- 11 Jun, 2003 4 commits
-
-
Alexander Viro authored
drivers/char/pty.c converted to dynamic allocation
-
Alexander Viro authored
drivers/char/vt.c converted to dynamic allocation
-
Alexander Viro authored
added helper functions for allocation and freeing tty_driver
-
Alexander Viro authored
->table[], ->termios[] and ->locked_termios[] allocated dynamically in tty_register_driver() and freed in tty_unregister_driver(). Per-driver arrays gone.
-