1. 09 8月, 2021 1 次提交
    • K
      net/smc: fix wait on already cleared link · 8f3d65c1
      Karsten Graul 提交于
      There can be a race between the waiters for a tx work request buffer
      and the link down processing that finally clears the link. Although
      all waiters are woken up before the link is cleared there might be
      waiters which did not yet get back control and are still waiting.
      This results in an access to a cleared wait queue head.
      
      Fix this by introducing atomic reference counting around the wait calls,
      and wait with the link clear processing until all waiters have finished.
      Move the work request layer related calls into smc_wr.c and set the
      link state to INACTIVE before calling smcr_link_clear() in
      smc_llc_srv_add_link().
      
      Fixes: 15e1b99a ("net/smc: no WR buffer wait for terminating link group")
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f3d65c1
  2. 30 6月, 2021 1 次提交
  3. 26 6月, 2021 1 次提交
  4. 22 6月, 2021 1 次提交
  5. 17 6月, 2021 4 次提交
  6. 04 6月, 2021 2 次提交
  7. 18 5月, 2021 1 次提交
  8. 13 5月, 2021 2 次提交
  9. 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
  10. 28 4月, 2021 1 次提交
  11. 02 4月, 2021 1 次提交
  12. 13 1月, 2021 2 次提交
  13. 17 12月, 2020 1 次提交
  14. 02 12月, 2020 14 次提交
  15. 20 11月, 2020 2 次提交
  16. 08 11月, 2020 1 次提交
  17. 01 11月, 2020 1 次提交
    • K
      net/smc: improve return codes for SMC-Dv2 · 3752404a
      Karsten Graul 提交于
      To allow better problem diagnosis the return codes for SMC-Dv2 are
      improved by this patch. A few more CLC DECLINE codes are defined and
      sent to the peer when an SMC connection cannot be established.
      There are now multiple SMC variations that are offered by the client and
      the server may encounter problems to initialize all of them.
      Because only one diagnosis code can be sent to the client the decision
      was made to send the first code that was encountered. Because the server
      tries the variations in the order of importance (SMC-Dv2, SMC-D, SMC-R)
      this makes sure that the diagnosis code of the most important variation
      is sent.
      
      v2: initialize rc in smc_listen_v2_check().
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Link: https://lore.kernel.org/r/20201031181938.69903-1-kgraul@linux.ibm.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3752404a
  18. 31 10月, 2020 1 次提交
  19. 27 10月, 2020 2 次提交