1. 02 5月, 2020 7 次提交
  2. 01 5月, 2020 14 次提交
  3. 30 4月, 2020 13 次提交
  4. 11 3月, 2020 1 次提交
  5. 27 2月, 2020 4 次提交
    • K
      net/smc: check for valid ib_client_data · a2f2ef4a
      Karsten Graul 提交于
      In smc_ib_remove_dev() check if the provided ib device was actually
      initialized for SMC before.
      
      Reported-by: syzbot+84484ccebdd4e5451d91@syzkaller.appspotmail.com
      Fixes: a4cf0443 ("smc: introduce SMC as an IB-client")
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2f2ef4a
    • H
      net/smc: improve peer ID in CLC decline for SMC-R · a082ec89
      Hans Wippel 提交于
      According to RFC 7609, all CLC messages contain a peer ID that consists
      of a unique instance ID and the MAC address of one of the host's RoCE
      devices. But if a SMC-R connection cannot be established, e.g., because
      no matching pnet table entry is found, the current implementation uses a
      zero value in the CLC decline message although the host's peer ID is set
      to a proper value.
      
      If no RoCE and no ISM device is usable for a connection, there is no LGR
      and the LGR check in smc_clc_send_decline() prevents that the peer ID is
      copied into the CLC decline message for both SMC-D and SMC-R. So, this
      patch modifies the check to also accept the case of no LGR. Also, only a
      valid peer ID is copied into the decline message.
      Signed-off-by: NHans Wippel <ndev@hwipl.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a082ec89
    • H
      net/smc: rework peer ID handling · 366bb249
      Hans Wippel 提交于
      This patch initializes the peer ID to a random instance ID and a zero
      MAC address. If a RoCE device is in the host, the MAC address part of
      the peer ID is overwritten with the respective address. Also, a function
      for checking if the peer ID is valid is added. A peer ID is considered
      valid if the MAC address part contains a non-zero MAC address.
      Signed-off-by: NHans Wippel <ndev@hwipl.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      366bb249
    • U
      net/smc: fix cleanup for linkgroup setup failures · 51e3dfa8
      Ursula Braun 提交于
      If an SMC connection to a certain peer is setup the first time,
      a new linkgroup is created. In case of setup failures, such a
      linkgroup is unusable and should disappear. As a first step the
      linkgroup is removed from the linkgroup list in smc_lgr_forget().
      
      There are 2 problems:
      smc_listen_decline() might be called before linkgroup creation
      resulting in a crash due to calling smc_lgr_forget() with
      parameter NULL.
      If a setup failure occurs after linkgroup creation, the connection
      is never unregistered from the linkgroup, preventing linkgroup
      freeing.
      
      This patch introduces an enhanced smc_lgr_cleanup_early() function
      which
      * contains a linkgroup check for early smc_listen_decline()
        invocations
      * invokes smc_conn_free() to guarantee unregistering of the
        connection.
      * schedules fast linkgroup removal of the unusable linkgroup
      
      And the unused function smcd_conn_free() is removed from smc_core.h.
      
      Fixes: 3b2dec26 ("net/smc: restructure client and server code in af_smc")
      Fixes: 2a0674ff ("net/smc: improve abnormal termination of link groups")
      Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com>
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51e3dfa8
  6. 18 2月, 2020 1 次提交