1. 10 1月, 2015 19 次提交
  2. 19 12月, 2014 1 次提交
  3. 13 12月, 2014 1 次提交
  4. 02 12月, 2014 1 次提交
  5. 27 11月, 2014 4 次提交
    • D
      serial: pxa: hold port.lock when reporting modem line changes · 50d1e7d1
      Dmitry Eremin-Solenikov 提交于
      Both uart_handle_dcd_change() and uart_handle_cts_change() require a
      port lock to be held and will emit a warning when lockdep is enabled.
      Held corresponding lock.
      
      This fixes the following warnings:
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2760 uart_handle_dcd_change+0xc8/0xf8()
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc5+ #26
      [<c000dff8>] (unwind_backtrace) from [<c000bc70>] (show_stack+0x10/0x14)
      [<c000bc70>] (show_stack) from [<c00192ac>] (warn_slowpath_common+0x6c/0x8c)
      [<c00192ac>] (warn_slowpath_common) from [<c00192e8>] (warn_slowpath_null+0x1c/0x24)
      [<c00192e8>] (warn_slowpath_null) from [<c0182984>] (uart_handle_dcd_change+0xc8/0xf8)
      [<c0182984>] (uart_handle_dcd_change) from [<c018625c>] (serial_pxa_irq+0x268/0x3b0)
      [<c018625c>] (serial_pxa_irq) from [<c004d0d4>] (handle_irq_event_percpu+0x50/0x16c)
      [<c004d0d4>] (handle_irq_event_percpu) from [<c004d22c>] (handle_irq_event+0x3c/0x5c)
      [<c004d22c>] (handle_irq_event) from [<c004f7d0>] (handle_level_irq+0x94/0x118)
      [<c004f7d0>] (handle_level_irq) from [<c004ca0c>] (generic_handle_irq+0x20/0x30)
      [<c004ca0c>] (generic_handle_irq) from [<c004cbe0>] (__handle_domain_irq+0x38/0x70)
      [<c004cbe0>] (__handle_domain_irq) from [<c00085c4>] (ichp_handle_irq+0x24/0x34)
      [<c00085c4>] (ichp_handle_irq) from [<c000c7e4>] (__irq_svc+0x44/0x54)
      Exception stack(0xc07c7f58 to 0xc07c7fa0)
      7f40:                                                       00000001 00000001
      7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000
      7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff
      [<c000c7e4>] (__irq_svc) from [<c0009f20>] (arch_cpu_idle+0x28/0x38)
      [<c0009f20>] (arch_cpu_idle) from [<c003c974>] (cpu_startup_entry+0x1b8/0x220)
      [<c003c974>] (cpu_startup_entry) from [<c0338c54>] (start_kernel+0x39c/0x40c)
      ---[ end trace 4c1b7ae03f6d9d30 ]---
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 0 at drivers/tty/serial/serial_core.c:2791 uart_handle_cts_change+0xa0/0xdc()
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper Tainted: G        W      3.18.0-rc5+ #26
      [<c000dff8>] (unwind_backtrace) from [<c000bc70>] (show_stack+0x10/0x14)
      [<c000bc70>] (show_stack) from [<c00192ac>] (warn_slowpath_common+0x6c/0x8c)
      [<c00192ac>] (warn_slowpath_common) from [<c00192e8>] (warn_slowpath_null+0x1c/0x24)
      [<c00192e8>] (warn_slowpath_null) from [<c018528c>] (uart_handle_cts_change+0xa0/0xdc)
      [<c018528c>] (uart_handle_cts_change) from [<c018624c>] (serial_pxa_irq+0x258/0x3b0)
      [<c018624c>] (serial_pxa_irq) from [<c004d0d4>] (handle_irq_event_percpu+0x50/0x16c)
      [<c004d0d4>] (handle_irq_event_percpu) from [<c004d22c>] (handle_irq_event+0x3c/0x5c)
      [<c004d22c>] (handle_irq_event) from [<c004f7d0>] (handle_level_irq+0x94/0x118)
      [<c004f7d0>] (handle_level_irq) from [<c004ca0c>] (generic_handle_irq+0x20/0x30)
      [<c004ca0c>] (generic_handle_irq) from [<c004cbe0>] (__handle_domain_irq+0x38/0x70)
      [<c004cbe0>] (__handle_domain_irq) from [<c00085c4>] (ichp_handle_irq+0x24/0x34)
      [<c00085c4>] (ichp_handle_irq) from [<c000c7e4>] (__irq_svc+0x44/0x54)
      Exception stack(0xc07c7f58 to 0xc07c7fa0)
      7f40:                                                       00000001 00000001
      7f60: 00000000 20000013 c07c6000 00000000 00000000 c07ce0a4 c07d7798 00000000
      7f80: c07e8fb8 0000004c 00000000 c07c7fa0 c0044798 c0009f20 20000013 ffffffff
      [<c000c7e4>] (__irq_svc) from [<c0009f20>] (arch_cpu_idle+0x28/0x38)
      [<c0009f20>] (arch_cpu_idle) from [<c003c974>] (cpu_startup_entry+0x1b8/0x220)
      [<c003c974>] (cpu_startup_entry) from [<c0338c54>] (start_kernel+0x39c/0x40c)
      ---[ end trace 4c1b7ae03f6d9d31 ]---
      Signed-off-by: NDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      50d1e7d1
    • M
      tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put" · 48f5cde5
      Markus Elfring 提交于
      The tty_kref_put() function tests whether its argument is NULL and then
      returns immediately. Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      48f5cde5
    • M
      tty: Deletion of unnecessary checks before two function calls · a211b1af
      Markus Elfring 提交于
      The functions put_device() and tty_kref_put() test whether their argument
      is NULL and then return immediately.
      Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a211b1af
    • C
      n_tty: Fix read_buf race condition, increment read_head after pushing data · 8bfbe2de
      Christian Riesch 提交于
      Commit 19e2ad6a ("n_tty: Remove overflow
      tests from receive_buf() path") moved the increment of read_head into
      the arguments list of read_buf_addr(). Function calls represent a
      sequence point in C. Therefore read_head is incremented before the
      character c is placed in the buffer. Since the circular read buffer is
      a lock-less design since commit 6d76bd26
      ("n_tty: Make N_TTY ldisc receive path lockless"), this creates a race
      condition that leads to communication errors.
      
      This patch modifies the code to increment read_head _after_ the data
      is placed in the buffer and thus fixes the race for non-SMP machines.
      To fix the problem for SMP machines, memory barriers must be added in
      a separate patch.
      Signed-off-by: NChristian Riesch <christian.riesch@omicron.at>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bfbe2de
  6. 26 11月, 2014 14 次提交