An error occurred fetching the project authors.
  1. 24 Aug, 2004 1 commit
    • Alexander Viro's avatar
      [PATCH] /dev/ptmx open() fixes · 854bfad5
      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.
      854bfad5
  2. 10 Aug, 2004 1 commit
  3. 07 Aug, 2004 1 commit
  4. 28 Jul, 2004 1 commit
  5. 29 Jun, 2004 1 commit
  6. 18 Jun, 2004 1 commit
  7. 30 May, 2004 1 commit
  8. 10 May, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] Fix race on tty close · e829d2e4
      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.
      e829d2e4
  9. 12 Apr, 2004 3 commits
    • Andrew Morton's avatar
      [PATCH] move job control fields from task_struct to signal_struct · 7860b371
      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.
      7860b371
    • Andrew Morton's avatar
      [PATCH] Fix VT open/close race · efffe9c8
      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);
      }
      efffe9c8
    • Andrew Morton's avatar
      [PATCH] remove down_tty_sem() · ef00e355
      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.
      ef00e355
  10. 15 Mar, 2004 1 commit
  11. 12 Mar, 2004 3 commits
    • Greg Kroah-Hartman's avatar
    • Jonathan Corbet's avatar
      [PATCH] cdev 2/2: hide cdev->kobj · fa31a260
      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.
      fa31a260
    • Jonathan Corbet's avatar
      [PATCH] cdev 1/2: Eliminate /sys/cdev · e9e883fe
      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.
      e9e883fe
  12. 10 Mar, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] tty oops fix · 4eedca38
      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.
      4eedca38
  13. 22 Feb, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] dynamic pty allocation · 562123b5
      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.
      562123b5
  14. 06 Feb, 2004 1 commit
    • Jonathan Corbet's avatar
      [PATCH] Char drivers: cdev_unmap() · d4f63c8a
      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.
      d4f63c8a
  15. 04 Feb, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] VT locking fixes · 93a2d85f
      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.
      93a2d85f
  16. 19 Jan, 2004 1 commit
  17. 22 Oct, 2003 1 commit
    • Alexander Viro's avatar
      [PATCH] fix for do_tty_hangup() access of kfreed memory · 16ca3698
      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.
      16ca3698
  18. 09 Oct, 2003 1 commit
    • Linus Torvalds's avatar
      Revert the process group accessor functions. They are buggy, and · 06349d9d
      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
      06349d9d
  19. 07 Oct, 2003 1 commit
  20. 05 Oct, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] move job control fields from task_struct to · 1bd563fd
      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.
      1bd563fd
  21. 23 Sep, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] switch remaining serial drivers to initcalls · f751e52a
      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.
      f751e52a
    • Alexander Viro's avatar
      [PATCH] prepare for 32-bit dev_t: tty usage · 7f904771
      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).
      7f904771
  22. 21 Sep, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] move some more initializations out of drivers/char/mem.c · 7b0db1f8
      Andrew Morton authored
      From: Christoph Hellwig <hch@lst.de>
      
      keeping init order the same..
      7b0db1f8
    • Andrew Morton's avatar
      [PATCH] Fix setpgid and threads · feaecce4
      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).
      feaecce4
  23. 05 Sep, 2003 4 commits
    • Alexander Viro's avatar
      [PATCH] large dev_t - second series (7/15) · ad1da81a
      Alexander Viro authored
      	the last kdev_t object is gone; ->i_rdev switched to dev_t.
      ad1da81a
    • Alexander Viro's avatar
      [PATCH] large dev_t - second series (6/15) · cbac67b1
      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.
      cbac67b1
    • Alexander Viro's avatar
      [PATCH] large dev_t - second series (5/15) · 25a6ca89
      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")
      25a6ca89
    • Alexander Viro's avatar
      [PATCH] large dev_t - second series (1/15) · b9e8bb61
      Alexander Viro authored
      	misc trivial cleanups
      b9e8bb61
  24. 31 Aug, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] tty oops fix · 2b7220f9
      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.
      2b7220f9
    • Alexander Viro's avatar
      [PATCH] dev_t handling cleanups (2/12) · 5be694bd
      Alexander Viro authored
      tty_paranoia_check() switched from kdev_t to struct inode.
      5be694bd
  25. 01 Aug, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] dev_t printing · 482a9473
      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.
      482a9473
  26. 29 Jul, 2003 1 commit
  27. 11 Jun, 2003 4 commits