1. 16 10月, 2021 4 次提交
  2. 09 10月, 2021 1 次提交
  3. 21 9月, 2021 2 次提交
    • K
      net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work · a18cee47
      Karsten Graul 提交于
      The abort_work is scheduled when a connection was detected to be
      out-of-sync after a link failure. The work calls smc_conn_kill(),
      which calls smc_close_active_abort() and that might end up calling
      smc_close_cancel_work().
      smc_close_cancel_work() cancels any pending close_work and tx_work but
      needs to release the sock_lock before and acquires the sock_lock again
      afterwards. So when the sock_lock was NOT acquired before then it may
      be held after the abort_work completes. Thats why the sock_lock is
      acquired before the call to smc_conn_kill() in __smc_lgr_terminate(),
      but this is missing in smc_conn_abort_work().
      
      Fix that by acquiring the sock_lock first and release it after the
      call to smc_conn_kill().
      
      Fixes: b286a065 ("net/smc: handle incoming CDC validation message")
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a18cee47
    • K
      net/smc: add missing error check in smc_clc_prfx_set() · 6c907319
      Karsten Graul 提交于
      Coverity stumbled over a missing error check in smc_clc_prfx_set():
      
      *** CID 1475954:  Error handling issues  (CHECKED_RETURN)
      /net/smc/smc_clc.c: 233 in smc_clc_prfx_set()
      >>>     CID 1475954:  Error handling issues  (CHECKED_RETURN)
      >>>     Calling "kernel_getsockname" without checking return value (as is done elsewhere 8 out of 10 times).
      233     	kernel_getsockname(clcsock, (struct sockaddr *)&addrs);
      
      Add the return code check in smc_clc_prfx_set().
      
      Fixes: c246d942 ("net/smc: restructure netinfo for CLC proposal msgs")
      Reported-by: NJulian Wiedmann <jwi@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6c907319
  4. 14 9月, 2021 3 次提交
  5. 09 8月, 2021 3 次提交
  6. 05 8月, 2021 1 次提交
  7. 30 6月, 2021 1 次提交
  8. 26 6月, 2021 1 次提交
  9. 22 6月, 2021 1 次提交
  10. 17 6月, 2021 4 次提交
  11. 04 6月, 2021 2 次提交
  12. 18 5月, 2021 1 次提交
  13. 13 5月, 2021 2 次提交
  14. 06 5月, 2021 1 次提交
    • C
      smc: disallow TCP_ULP in smc_setsockopt() · 86214366
      Cong Wang 提交于
      syzbot is able to setup kTLS on an SMC socket which coincidentally
      uses sk_user_data too. Later, kTLS treats it as psock so triggers a
      refcnt warning. The root cause is that smc_setsockopt() simply calls
      TCP setsockopt() which includes TCP_ULP. I do not think it makes
      sense to setup kTLS on top of SMC sockets, so we should just disallow
      this setup.
      
      It is hard to find a commit to blame, but we can apply this patch
      since the beginning of TCP_ULP.
      
      Reported-and-tested-by: syzbot+b54a1ce86ba4a623b7f0@syzkaller.appspotmail.com
      Fixes: 734942cc ("tcp: ULP infrastructure")
      Cc: John Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NCong Wang <cong.wang@bytedance.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86214366
  15. 28 4月, 2021 1 次提交
  16. 02 4月, 2021 1 次提交
  17. 13 1月, 2021 2 次提交
  18. 17 12月, 2020 1 次提交
  19. 02 12月, 2020 8 次提交