1. 20 9月, 2009 1 次提交
  2. 18 9月, 2009 2 次提交
  3. 16 9月, 2009 3 次提交
    • D
      sparc: Kill PROM console driver. · 09d3f3f0
      David S. Miller 提交于
      Many years ago when this driver was written, it had a use, but these
      days it's nothing but trouble and distributions should not enable it
      in any situation.
      
      Pretty much every console device a sparc machine could see has a
      bonafide real driver, making the PROM console hack unnecessary.
      
      If any new device shows up, we should write a driver instead of
      depending upon this crutch to save us.  We've been able to take care
      of this even when no chip documentation exists (sunxvr500, sunxvr2500)
      so there are no excuses.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09d3f3f0
    • J
      mem_class: fix bug · 162dd421
      Jin Dongming 提交于
      When I build and boot -next on fedora 10, I can not login anymore.
      When I input the user name and password, the system does not output
      any message and requires user to input the user name and password
      again and again.
      
      I find the patch which caused this problem with "GIT BISECT" command.
      And the patch is
          commit 7c4b7daa1878972ed0137c95f23569124bd6e2b1
          "mem_class: use minor as index instead of searching the array".
      
      Though I don't know the real reason why user could not login, I
      confirmed the patch I made as following could resolve the problem on
      fedora 10.
      Signed-off-by: NJin Dongming <jin.dongming@np.css.fujitsu.com>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      162dd421
    • K
      mem_class: use minor as index instead of searching the array · 389e0cb9
      Kay Sievers 提交于
      Declare the device list with the minor numbers as the index, which saves us from
      searching for a matching list entry. Remove old devfs permissions declaration.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      389e0cb9
  4. 15 9月, 2009 2 次提交
  5. 14 9月, 2009 2 次提交
  6. 11 9月, 2009 3 次提交
  7. 10 9月, 2009 1 次提交
  8. 06 9月, 2009 2 次提交
    • L
      pty: don't limit the writes to 'pty_space()' inside 'pty_write()' · ac89a917
      Linus Torvalds 提交于
      The whole write-room thing is something that is up to the _caller_ to
      worry about, not the pty layer itself.  The total buffer space will
      still be limited by the buffering routines themselves, so there is no
      advantage or need in having pty_write() artificially limit the size
      somehow.
      
      And what happened was that the caller (the n_tty line discipline, in
      this case) may have verified that there is room for 2 bytes to be
      written (for NL -> CRNL expansion), and it used to then do those writes
      as two single-byte writes.  And if the first byte written (CR) then
      caused a new tty buffer to be allocated, pty_space() may have returned
      zero when trying to write the second byte (LF), and then incorrectly
      failed the write - leading to a lost newline character.
      
      This should finally fix
      
      	http://bugzilla.kernel.org/show_bug.cgi?id=14015Reported-by: NMikael Pettersson <mikpe@it.uu.se>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac89a917
    • L
      n_tty: do O_ONLCR translation as a single write · 37f81fa1
      Linus Torvalds 提交于
      When translating CR to CRNL in the n_tty line discipline, we did it as
      two tty_put_char() calls.  Which works, but is stupid, and has caused
      problems before too with bad interactions with the write_room() logic.
      The generic USB serial driver had that problem, for example.
      
      Now the pty layer had similar issues after being moved to the generic
      tty buffering code (in commit d945cb9c:
      "pty: Rework the pty layer to use the normal buffering logic").
      
      So stop doing the silly separate two writes, and do it as a single write
      instead.  That's what the n_tty layer already does for the space
      expansion of tabs (XTABS), and it means that we'll now always have just
      a single write for the CRNL to match the single 'tty_write_room()' test,
      which hopefully means that the next time somebody screws up buffering,
      it won't cause weeks of debugging.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      37f81fa1
  9. 03 9月, 2009 1 次提交
  10. 01 9月, 2009 1 次提交
  11. 28 8月, 2009 1 次提交
  12. 26 8月, 2009 1 次提交
    • L
      tty: make sure to flush any pending work when halting the ldisc · 5c58ceff
      Linus Torvalds 提交于
      When I rewrote tty ldisc code to use proper reference counts (commits
      65b77046 and cbe9352f) in order to avoid a race with hangup, the
      test-program that Eric Biederman used to trigger the original problem
      seems to have exposed another long-standing bug: the hangup code did the
      'tty_ldisc_halt()' to stop any buffer flushing activity, but unlike the
      other call sites it never actually flushed any pending work.
      
      As a result, if you get just the right timing, the pending work may be
      just about to execute (ie the timer has already triggered and thus
      cancel_delayed_work() was a no-op), when we then re-initialize the ldisc
      from under it.
      
      That, in turn, results in various random problems, usually seen as a
      NULL pointer dereference in run_timer_softirq() or a BUG() in
      worker_thread (but it can be almost anything).
      
      Fix it by adding the required 'flush_scheduled_work()' after doing the
      tty_ldisc_halt() (this also requires us to move the ldisc halt to before
      taking the ldisc mutex in order to avoid a deadlock with the workqueue
      executing do_tty_hangup, which requires the mutex).
      
      The locking should be cleaned up one day (the requirement to do this
      outside the ldisc_mutex is very annoying, and weakens the lock), but
      that's a larger and separate undertaking.
      Reported-by: NEric W. Biederman <ebiederm@xmission.com>
      Tested-by: NXiaotian Feng <xtfeng@gmail.com>
      Tested-by: NYanmin Zhang <yanmin_zhang@linux.intel.com>
      Tested-by: NDave Young <hidave.darkstar@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5c58ceff
  13. 20 8月, 2009 4 次提交
  14. 11 8月, 2009 1 次提交
    • L
      pty: fix data loss when stopped (^S/^Q) · 85dfd81d
      Linus Torvalds 提交于
      Commit d945cb9c ("pty: Rework the pty layer to use the normal buffering
      logic") dropped the test for 'tty->stopped' in pty_write_room(), which
      then causes the n_tty line discipline thing to not throttle the data
      properly when the tty is stopped.
      
      So instead of pausing the write due to the tty being stopped, the ldisc
      layer would go ahead and push it down to the pty.  The pty write()
      routine would then refuse to take the data (because it _did_ check
      'stopped'), and the data wouldn't actually be written.
      
      This whole stopped test should eventually be moved into the tty ldisc
      layer rather than have low-level tty drivers care about these things,
      but right now the fix is to just re-instate the missing pty 'stopped'
      handling.
      Reported-and-tested-by: NArtur Skawina <art.08.09@gmail.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      85dfd81d
  15. 06 8月, 2009 1 次提交
  16. 05 8月, 2009 4 次提交
    • D
      intel-agp: Set dma mask for i915 · ba3139f2
      David Woodhouse 提交于
      If DMAR is configured in but absent, we really do want to make sure that
      the dma mask is set appropriately. Otherwise we get mapping failures on
      highmem. Spotted by Zhenyu Wang.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      ba3139f2
    • L
      tty-ldisc: be more careful in 'put_ldisc' locking · cbe9352f
      Linus Torvalds 提交于
      Use 'atomic_dec_and_lock()' to make sure that we always hold the
      tty_ldisc_lock when the ldisc count goes to zero. That way we can never
      race against 'tty_ldisc_try()' increasing the count again.
      Reported-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Tested-by: NSergey Senozhatsky <sergey.senozhatsky@mail.by>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cbe9352f
    • L
      tty-ldisc: turn ldisc user count into a proper refcount · 65b77046
      Linus Torvalds 提交于
      By using the user count for the actual lifetime rules, we can get rid of
      the silly "wait_for_idle" logic, because any busy ldisc will
      automatically stay around until the last user releases it.  This avoids
      a host of odd issues, and simplifies the code.
      
      So now, when the last ldisc reference is dropped, we just release the
      ldisc operations struct reference, and free the ldisc.
      
      It looks obvious enough, and it does work for me, but the counting
      _could_ be off. It probably isn't (bad counting in the new version would
      generally imply that the old code did something really bad, like free an
      ldisc with a non-zero count), but it does need some testing, and
      preferably somebody looking at it.
      
      With this change, both 'tty_ldisc_put()' and 'tty_ldisc_deref()' are
      just aliases for the new ref-counting 'put_ldisc()'. Both of them
      decrement the ldisc user count and free it if it goes down to zero.
      They're identical functions, in other words.
      
      But the reason they still exist as sepate functions is that one of them
      was exported (tty_ldisc_deref) and had a stupid name (so I don't want to
      use it as the main name), and the other one was used in multiple places
      (and I didn't want to make the patch larger just to rename the users).
      
      In addition to the refcounting, I did do some minimal cleanup. For
      example, now "tty_ldisc_try()" actually returns the ldisc it got under
      the lock, rather than returning true/false and then the caller would
      look up the ldisc again (now without the protection of the lock).
      
      That said, there's tons of dubious use of 'tty->ldisc' without obviously
      proper locking or refcounting left. I expressly did _not_ want to try to
      fix it all, keeping the patch minimal. There may or may not be bugs in
      that kind of code, but they wouldn't be _new_ bugs.
      
      That said, even if the bugs aren't new, the timing and lifetime will
      change. For example, some silly code may depend on the 'tty->ldisc'
      pointer not changing because they hold a refcount on the 'ldisc'. And
      that's no longer true - if you hold a ref on the ldisc, the 'ldisc'
      itself is safe, but tty->ldisc may change.
      
      So the proper locking (remains) to hold tty->ldisc_mutex if you expect
      tty->ldisc to be stable. That's not really a _new_ rule, but it's an
      example of something that the old code might have unintentionally
      depended on and hidden bugs.
      
      Whatever. The patch _looks_ sensible to me. The only users of
      ldisc->users are:
       - get_ldisc() - atomically increment the count
      
       - put_ldisc() - atomically decrements the count and releases if zero
      
       - tty_ldisc_try_get() - creates the ldisc, and sets the count to 1.
         The ldisc should then either be released, or be attached to a tty.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Tested-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Tested-by: NSergey Senozhatsky <sergey.senozhatsky@mail.by>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65b77046
    • L
      tty-ldisc: make refcount be atomic_t 'users' count · 18eac1cc
      Linus Torvalds 提交于
      This is pure preparation of changing the ldisc reference counting to be
      a true refcount that defines the lifetime of the ldisc.  But this is a
      purely syntactic change for now to make the next steps easier.
      
      This patch should make no semantic changes at all. But I wanted to make
      the ldisc refcount be an atomic (I will be touching it without locks
      soon enough), and I wanted to rename it so that there isn't quite as
      much confusion between 'ldo->refcount' (ldisk operations refcount) and
      'ld->refcount' (ldisc refcount itself) in the same file.
      
      So it's now an atomic 'ld->users' count. It still starts at zero,
      despite having a reference from 'tty->ldisc', but that will change once
      we turn it into a _real_ refcount.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Tested-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Tested-by: NSergey Senozhatsky <sergey.senozhatsky@mail.by>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      18eac1cc
  17. 03 8月, 2009 9 次提交
  18. 02 8月, 2009 1 次提交