1. 02 2月, 2015 2 次提交
    • O
      hso: fix crash when device disappears while serial port is open · 29bd3bc1
      Olivier Sobrie 提交于
      When the device disappear, the function hso_disconnect() is called to
      perform cleanup. In the cleanup function, hso_free_interface() calls
      tty_port_tty_hangup() in view of scheduling a work to hang up the tty if
      needed. If the port was not open then hso_serial_ref_free() is called
      directly to cleanup everything. Otherwise, hso_serial_ref_free() is called
      when the last fd associated to the port is closed.
      
      For each open port, tty_release() will call the close method,
      hso_serial_close(), which drops the last kref and call
      hso_serial_ref_free() which unregisters, destroys the tty port
      and finally frees the structure in which the tty_port structure
      is included. Later, in tty_release(), more precisely when release_tty()
      is called, the tty_port previously freed is accessed to cancel
      the tty buf workqueue and it leads to a crash.
      
      In view of avoiding this crash, we add a cleanup method that is called
      at the end of the hangup process and we drop the last kref in this
      function when all the ports have been closed, when tty_port is no
      more needed and when it is safe to free the structure containing the
      tty_port structure.
      Signed-off-by: NOlivier Sobrie <olivier@sobrie.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29bd3bc1
    • O
      hso: remove useless header file timer.h · 3ac856c1
      Olivier Sobrie 提交于
      No timer related function is used in this driver.
      Signed-off-by: NOlivier Sobrie <olivier@sobrie.be>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ac856c1
  2. 01 2月, 2015 3 次提交
  3. 31 1月, 2015 7 次提交
  4. 30 1月, 2015 4 次提交
  5. 29 1月, 2015 6 次提交
  6. 28 1月, 2015 18 次提交