1. 05 6月, 2014 2 次提交
  2. 30 5月, 2014 1 次提交
    • B
      IB/umad: Fix error handling · 8ec0a0e6
      Bart Van Assche 提交于
      Avoid leaking a kref count in ib_umad_open() if port->ib_dev == NULL
      or if nonseekable_open() fails.
      
      Avoid leaking a kref count, that sm_sem is kept down and also that the
      IB_PORT_SM capability mask is not cleared in ib_umad_sm_open() if
      nonseekable_open() fails.
      
      Since container_of() never returns NULL, remove the code that tests
      whether container_of() returns NULL.
      
      Moving the kref_get() call from the start of ib_umad_*open() to the
      end is safe since it is the responsibility of the caller of these
      functions to ensure that the cdev pointer remains valid until at least
      when these functions return.
      Signed-off-by: NBart Van Assche <bvanassche@acm.org>
      Cc: <stable@vger.kernel.org>
      
      [ydroneaud@opteya.com: rework a bit to reduce the amount of code changed]
      Signed-off-by: NYann Droneaud <ydroneaud@opteya.com>
      
      [ nonseekable_open() can't actually fail, but....  - Roland ]
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      8ec0a0e6
  3. 08 5月, 2014 1 次提交
  4. 07 5月, 2014 2 次提交
  5. 06 5月, 2014 29 次提交
  6. 05 5月, 2014 5 次提交