1. 16 10月, 2020 1 次提交
    • K
      net/smc: fix use-after-free of delayed events · d535ca13
      Karsten Graul 提交于
      When a delayed event is enqueued then the event worker will send this
      event the next time it is running and no other flow is currently
      active. The event handler is called for the delayed event, and the
      pointer to the event keeps set in lgr->delayed_event. This pointer is
      cleared later in the processing by smc_llc_flow_start().
      This can lead to a use-after-free condition when the processing does not
      reach smc_llc_flow_start(), but frees the event because of an error
      situation. Then the delayed_event pointer is still set but the event is
      freed.
      Fix this by always clearing the delayed event pointer when the event is
      provided to the event handler for processing, and remove the code to
      clear it in smc_llc_flow_start().
      
      Fixes: 555da9af ("net/smc: add event-based llc_flow framework")
      Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      d535ca13
  2. 11 10月, 2020 2 次提交
    • P
      net: smc: fix missing brace warning for old compilers · 16cb3653
      Pujin Shi 提交于
      For older versions of gcc, the array = {0}; will cause warnings:
      
      net/smc/smc_llc.c: In function 'smc_llc_add_link_local':
      net/smc/smc_llc.c:1212:9: warning: missing braces around initializer [-Wmissing-braces]
        struct smc_llc_msg_add_link add_llc = {0};
               ^
      net/smc/smc_llc.c:1212:9: warning: (near initialization for 'add_llc.hd') [-Wmissing-braces]
      net/smc/smc_llc.c: In function 'smc_llc_srv_delete_link_local':
      net/smc/smc_llc.c:1245:9: warning: missing braces around initializer [-Wmissing-braces]
        struct smc_llc_msg_del_link del_llc = {0};
               ^
      net/smc/smc_llc.c:1245:9: warning: (near initialization for 'del_llc.hd') [-Wmissing-braces]
      
      2 warnings generated
      
      Fixes: 4dadd151 ("net/smc: enqueue local LLC messages")
      Signed-off-by: NPujin Shi <shipujin.t@gmail.com>
      Acked-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      16cb3653
    • P
      net: smc: fix missing brace warning for old compilers · 7e94e46c
      Pujin Shi 提交于
      For older versions of gcc, the array = {0}; will cause warnings:
      
      net/smc/smc_llc.c: In function 'smc_llc_send_link_delete_all':
      net/smc/smc_llc.c:1317:9: warning: missing braces around initializer [-Wmissing-braces]
        struct smc_llc_msg_del_link delllc = {0};
               ^
      net/smc/smc_llc.c:1317:9: warning: (near initialization for 'delllc.hd') [-Wmissing-braces]
      
      1 warnings generated
      
      Fixes: f3811fd7 ("net/smc: send DELETE_LINK, ALL message and wait for send to complete")
      Signed-off-by: NPujin Shi <shipujin.t@gmail.com>
      Acked-by: NKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      7e94e46c
  3. 04 9月, 2020 1 次提交
    • K
      net/smc: fix toleration of fake add_link messages · fffe83c8
      Karsten Graul 提交于
      Older SMCR implementations had no link failover support and used one
      link only. Because the handshake protocol requires to try the
      establishment of a second link the old code sent a fake add_link message
      and declined any server response afterwards.
      The current code supports multiple links and inspects the received fake
      add_link message more closely. To tolerate the fake add_link messages
      smc_llc_is_local_add_link() needs an improved check of the message to
      be able to separate between locally enqueued and fake add_link messages.
      And smc_llc_cli_add_link() needs to check if the provided qp_mtu size is
      invalid and reject the add_link request in that case.
      
      Fixes: c48254fa ("net/smc: move add link processing for new device into llc layer")
      Reviewed-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>
      fffe83c8
  4. 20 7月, 2020 5 次提交
  5. 09 7月, 2020 2 次提交
  6. 08 5月, 2020 1 次提交
  7. 06 5月, 2020 1 次提交
  8. 05 5月, 2020 6 次提交
  9. 04 5月, 2020 11 次提交
  10. 03 5月, 2020 1 次提交
  11. 02 5月, 2020 5 次提交
  12. 01 5月, 2020 4 次提交