1. 17 May, 2023 8 commits
  2. 16 May, 2023 1 commit
  3. 15 May, 2023 19 commits
  4. 13 May, 2023 10 commits
  5. 12 May, 2023 2 commits
    • Eric Dumazet's avatar
      tcp: fix possible sk_priority leak in tcp_v4_send_reset() · 1e306ec4
      Eric Dumazet authored
      When tcp_v4_send_reset() is called with @sk == NULL,
      we do not change ctl_sk->sk_priority, which could have been
      set from a prior invocation.
      
      Change tcp_v4_send_reset() to set sk_priority and sk_mark
      fields before calling ip_send_unicast_reply().
      
      This means tcp_v4_send_reset() and tcp_v4_send_ack()
      no longer have to clear ctl_sk->sk_mark after
      their call to ip_send_unicast_reply().
      
      Fixes: f6c0f5d2 ("tcp: honor SO_PRIORITY in TIME_WAIT state")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Antoine Tenart <atenart@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e306ec4
    • Zhuang Shengen's avatar
      vsock: avoid to close connected socket after the timeout · 6d4486ef
      Zhuang Shengen authored
      When client and server establish a connection through vsock,
      the client send a request to the server to initiate the connection,
      then start a timer to wait for the server's response. When the server's
      RESPONSE message arrives, the timer also times out and exits. The
      server's RESPONSE message is processed first, and the connection is
      established. However, the client's timer also times out, the original
      processing logic of the client is to directly set the state of this vsock
      to CLOSE and return ETIMEDOUT. It will not notify the server when the port
      is released, causing the server port remain.
      when client's vsock_connect timeout,it should check sk state is
      ESTABLISHED or not. if sk state is ESTABLISHED, it means the connection
      is established, the client should not set the sk state to CLOSE
      
      Note: I encountered this issue on kernel-4.18, which can be fixed by
      this patch. Then I checked the latest code in the community
      and found similar issue.
      
      Fixes: d021c344 ("VSOCK: Introduce VM Sockets")
      Signed-off-by: default avatarZhuang Shengen <zhuangshengen@huawei.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d4486ef