1. 17 7月, 2012 2 次提交
  2. 13 7月, 2012 3 次提交
  3. 07 7月, 2012 1 次提交
    • A
      tty: localise the lock · f5e3bcc5
      Alan Cox 提交于
      The termios and other changes mean the other protections needed on the driver
      tty arrays should be adequate. Turn it all back on.
      
      This contains pieces folded in from the fixes made to the original patches
      
      | From: Geert Uytterhoeven <geert@linux-m68k.org>	(fix m68k)
      | From: Paul Gortmaker <paul.gortmaker@windriver.com>	(fix cris)
      | From: Jiri Kosina <jkosina@suze.cz>			(lockdep)
      | From: Eric Dumazet <eric.dumazet@gmail.com>		(lockdep)
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f5e3bcc5
  4. 21 6月, 2012 1 次提交
    • D
      pch_uart: Add eg20t_port lock field, avoid recursive spinlocks · fe89def7
      Darren Hart 提交于
      pch_uart_interrupt() takes priv->port.lock which leads to two recursive
      spinlock calls if low_latency==1 or CONFIG_PREEMPT_RT_FULL=y (one
      otherwise):
      
      pch_uart_interrupt
        spin_lock_irqsave(priv->port.lock, flags)
        case PCH_UART_IID_RDR_TO (data ready)
        handle_rx_to
          push_rx
            tty_port_tty_get
              spin_lock_irqsave(&port->lock, flags) <--- already hold this lock
              ...
            tty_flip_buffer_push
              ...
              flush_to_ldisc
                spin_lock_irqsave(&tty->buf.lock)
                  spin_lock_irqsave(&tty->buf.lock)
                  disc->ops->receive_buf(tty, char_buf)
                    n_tty_receive_buf
                      tty->ops->flush_chars()
                      uart_flush_chars
                        uart_start
                          spin_lock_irqsave(&port->lock) <--- already hold this lock
      
      Avoid this by using a dedicated lock to protect the eg20t_port structure
      and IO access to its membase. This is more consistent with the 8250
      driver.  Ensure priv->lock is always take prior to priv->port.lock when
      taken at the same time.
      
      V2: Remove inadvertent whitespace change.
      V3: Account for oops_in_progress for the private lock in
          pch_console_write().
      
      Note: Like the 8250 driver, if a printk is introduced anywhere inside
            the pch_console_write() critical section, the kernel will hang
            on a recursive spinlock on the private lock. The oops case is
            handled by using a trylock in the oops_in_progress case.
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      CC: Tomoya MORINAGA <tomoya.rohm@gmail.com>
      CC: Feng Tang <feng.tang@intel.com>
      CC: Alexander Stein <alexander.stein@systec-electronic.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe89def7
  5. 19 6月, 2012 1 次提交
  6. 16 6月, 2012 1 次提交
    • C
      serial: pxa: add spin lock for console write · cfe275c2
      Chao Xie 提交于
      v3:
      Remove empty line
      
      v2:
      Move local_irq_save() after clk_prepare_enable()
      
      v1:
      At UP mode, when cpu want to print message in kernel, it will invoke
      peempt_disable and disable irq. So it is safe for UP mode.
      For SMP mode, it is not safe to protect the HW reigsters.
      one CPU will run a program which will invoke printf.
      another CPU will run a program in kernel that invoke printk.
      So when second CPU is trying to printk, it will do
      1. save ier register
      2. enable uue bit of ier register
      3. push buffer to uart fifo
      4 .restore ier register
      when first CPU want to printf, and it happens between 1 and 4, it will
      enable thre bit of ier, and waiting for transmit intterupt. while step 4
      will make the ier lost thre bit.
      add spin lock here to protect the ier register for console write.
      Signed-off-by: NChao Xie <chao.xie@marvell.com>
      Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cfe275c2
  7. 13 6月, 2012 16 次提交
  8. 03 6月, 2012 1 次提交
    • L
      tty: Revert the tty locking series, it needs more work · f309532b
      Linus Torvalds 提交于
      This reverts the tty layer change to use per-tty locking, because it's
      not correct yet, and fixing it will require some more deep surgery.
      
      The main revert is d29f3ef3 ("tty_lock: Localise the lock"), but
      there are several smaller commits that built upon it, they also get
      reverted here. The list of reverted commits is:
      
        fde86d31 - tty: add lockdep annotations
        8f6576ad - tty: fix ldisc lock inversion trace
        d3ca8b64 - pty: Fix lock inversion
        b1d679af - tty: drop the pty lock during hangup
        abcefe5f - tty/amiserial: Add missing argument for tty_unlock()
        fd11b42e - cris: fix missing tty arg in wait_event_interruptible_tty call
        d29f3ef3 - tty_lock: Localise the lock
      
      The revert had a trivial conflict in the 68360serial.c staging driver
      that got removed in the meantime.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f309532b
  9. 21 5月, 2012 1 次提交
  10. 18 5月, 2012 6 次提交
  11. 16 5月, 2012 1 次提交
  12. 15 5月, 2012 3 次提交
  13. 12 5月, 2012 2 次提交
  14. 11 5月, 2012 1 次提交