]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Mar 2024 08:26:08 +0000 (09:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Mar 2024 08:26:08 +0000 (09:26 +0100)
added patches:
mptcp-add-needs_id-for-netlink-appending-addr.patch
mptcp-clean-up-harmless-false-expressions.patch
mptcp-move-__mptcp_error_report-in-protocol.c.patch
mptcp-process-pending-subflow-error-on-close.patch
mptcp-rename-timer-related-helper-to-less-confusing-names.patch
selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch
selftests-mptcp-add-missing-kconfig-for-nf-filter.patch

queue-5.15/mptcp-add-needs_id-for-netlink-appending-addr.patch [new file with mode: 0644]
queue-5.15/mptcp-clean-up-harmless-false-expressions.patch [new file with mode: 0644]
queue-5.15/mptcp-move-__mptcp_error_report-in-protocol.c.patch [new file with mode: 0644]
queue-5.15/mptcp-process-pending-subflow-error-on-close.patch [new file with mode: 0644]
queue-5.15/mptcp-rename-timer-related-helper-to-less-confusing-names.patch [new file with mode: 0644]
queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch [new file with mode: 0644]
queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/mptcp-add-needs_id-for-netlink-appending-addr.patch b/queue-5.15/mptcp-add-needs_id-for-netlink-appending-addr.patch
new file mode 100644 (file)
index 0000000..df0b7b3
--- /dev/null
@@ -0,0 +1,102 @@
+From stable+bounces-25408-greg=kroah.com@vger.kernel.org Wed Feb 28 18:38:00 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:37:16 +0100
+Subject: mptcp: add needs_id for netlink appending addr
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Geliang Tang <tanggeliang@kylinos.cn>, Mat Martineau <martineau@kernel.org>, Matthieu Baerts <matttbe@kernel.org>, "David S . Miller" <davem@davemloft.net>
+Message-ID: <20240228173714.262012-4-matttbe@kernel.org>
+
+From: Geliang Tang <tanggeliang@kylinos.cn>
+
+commit 584f3894262634596532cf43a5e782e34a0ce374 upstream.
+
+Just the same as userspace PM, a new parameter needs_id is added for
+in-kernel PM mptcp_pm_nl_append_new_local_addr() too.
+
+Add a new helper mptcp_pm_has_addr_attr_id() to check whether an address
+ID is set from PM or not.
+
+In mptcp_pm_nl_get_local_id(), needs_id is always true, but in
+mptcp_pm_nl_add_addr_doit(), pass mptcp_pm_has_addr_attr_id() to
+needs_it.
+
+Fixes: efd5a4c04e18 ("mptcp: add the address ID assignment bitmap")
+Cc: stable@vger.kernel.org
+Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/pm_netlink.c |   24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+--- a/net/mptcp/pm_netlink.c
++++ b/net/mptcp/pm_netlink.c
+@@ -823,7 +823,8 @@ static bool address_use_port(struct mptc
+ }
+ static int mptcp_pm_nl_append_new_local_addr(struct pm_nl_pernet *pernet,
+-                                           struct mptcp_pm_addr_entry *entry)
++                                           struct mptcp_pm_addr_entry *entry,
++                                           bool needs_id)
+ {
+       struct mptcp_pm_addr_entry *cur;
+       unsigned int addr_max;
+@@ -850,7 +851,7 @@ static int mptcp_pm_nl_append_new_local_
+                       goto out;
+       }
+-      if (!entry->addr.id) {
++      if (!entry->addr.id && needs_id) {
+ find_next:
+               entry->addr.id = find_next_zero_bit(pernet->id_bitmap,
+                                                   MAX_ADDR_ID + 1,
+@@ -861,7 +862,7 @@ find_next:
+               }
+       }
+-      if (!entry->addr.id)
++      if (!entry->addr.id && needs_id)
+               goto out;
+       __set_bit(entry->addr.id, pernet->id_bitmap);
+@@ -1001,7 +1002,7 @@ int mptcp_pm_nl_get_local_id(struct mptc
+       entry->ifindex = 0;
+       entry->flags = 0;
+       entry->lsk = NULL;
+-      ret = mptcp_pm_nl_append_new_local_addr(pernet, entry);
++      ret = mptcp_pm_nl_append_new_local_addr(pernet, entry, true);
+       if (ret < 0)
+               kfree(entry);
+@@ -1202,6 +1203,18 @@ next:
+       return 0;
+ }
++static bool mptcp_pm_has_addr_attr_id(const struct nlattr *attr,
++                                    struct genl_info *info)
++{
++      struct nlattr *tb[MPTCP_PM_ADDR_ATTR_MAX + 1];
++
++      if (!nla_parse_nested_deprecated(tb, MPTCP_PM_ADDR_ATTR_MAX, attr,
++                                       mptcp_pm_addr_policy, info->extack) &&
++          tb[MPTCP_PM_ADDR_ATTR_ID])
++              return true;
++      return false;
++}
++
+ static int mptcp_nl_cmd_add_addr(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct nlattr *attr = info->attrs[MPTCP_PM_ATTR_ADDR];
+@@ -1228,7 +1241,8 @@ static int mptcp_nl_cmd_add_addr(struct
+                       return ret;
+               }
+       }
+-      ret = mptcp_pm_nl_append_new_local_addr(pernet, entry);
++      ret = mptcp_pm_nl_append_new_local_addr(pernet, entry,
++                                              !mptcp_pm_has_addr_attr_id(attr, info));
+       if (ret < 0) {
+               GENL_SET_ERR_MSG(info, "too many addresses or duplicate one");
+               if (entry->lsk)
diff --git a/queue-5.15/mptcp-clean-up-harmless-false-expressions.patch b/queue-5.15/mptcp-clean-up-harmless-false-expressions.patch
new file mode 100644 (file)
index 0000000..6aaba03
--- /dev/null
@@ -0,0 +1,59 @@
+From stable+bounces-25407-greg=kroah.com@vger.kernel.org Wed Feb 28 18:37:44 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:37:15 +0100
+Subject: mptcp: clean up harmless false expressions
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Jean Sacren <sakiwit@gmail.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matttbe@kernel.org>
+Message-ID: <20240228173714.262012-3-matttbe@kernel.org>
+
+From: Jean Sacren <sakiwit@gmail.com>
+
+commit 59060a47ca50bbdb1d863b73667a1065873ecc06 upstream.
+
+entry->addr.id is u8 with a range from 0 to 255 and MAX_ADDR_ID is 255.
+We should drop both false expressions of (entry->addr.id > MAX_ADDR_ID).
+
+We should also remove the obsolete parentheses in the first if branch.
+
+Use U8_MAX for MAX_ADDR_ID and add a comment to show the link to
+mptcp_addr_info.id as suggested by Mr. Matthieu Baerts.
+
+Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: Jean Sacren <sakiwit@gmail.com>
+Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/pm_netlink.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/net/mptcp/pm_netlink.c
++++ b/net/mptcp/pm_netlink.c
+@@ -38,7 +38,8 @@ struct mptcp_pm_add_entry {
+       u8                      retrans_times;
+ };
+-#define MAX_ADDR_ID           255
++/* max value of mptcp_addr_info.id */
++#define MAX_ADDR_ID           U8_MAX
+ #define BITMAP_SZ DIV_ROUND_UP(MAX_ADDR_ID + 1, BITS_PER_LONG)
+ struct pm_nl_pernet {
+@@ -854,14 +855,13 @@ find_next:
+               entry->addr.id = find_next_zero_bit(pernet->id_bitmap,
+                                                   MAX_ADDR_ID + 1,
+                                                   pernet->next_id);
+-              if ((!entry->addr.id || entry->addr.id > MAX_ADDR_ID) &&
+-                  pernet->next_id != 1) {
++              if (!entry->addr.id && pernet->next_id != 1) {
+                       pernet->next_id = 1;
+                       goto find_next;
+               }
+       }
+-      if (!entry->addr.id || entry->addr.id > MAX_ADDR_ID)
++      if (!entry->addr.id)
+               goto out;
+       __set_bit(entry->addr.id, pernet->id_bitmap);
diff --git a/queue-5.15/mptcp-move-__mptcp_error_report-in-protocol.c.patch b/queue-5.15/mptcp-move-__mptcp_error_report-in-protocol.c.patch
new file mode 100644 (file)
index 0000000..e505bb0
--- /dev/null
@@ -0,0 +1,119 @@
+From stable+bounces-25402-greg=kroah.com@vger.kernel.org Wed Feb 28 18:32:33 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:31:58 +0100
+Subject: mptcp: move __mptcp_error_report in protocol.c
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <martineau@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, "David S . Miller" <davem@davemloft.net>, Matthieu Baerts <matttbe@kernel.org>
+Message-ID: <20240228173157.255719-2-matttbe@kernel.org>
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+commit d5fbeff1ab812b6c473b6924bee8748469462e2c upstream.
+
+This will simplify the next patch ("mptcp: process pending subflow error
+on close").
+
+No functional change intended.
+
+Cc: stable@vger.kernel.org # v5.12+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/protocol.c |   36 ++++++++++++++++++++++++++++++++++++
+ net/mptcp/subflow.c  |   36 ------------------------------------
+ 2 files changed, 36 insertions(+), 36 deletions(-)
+
+--- a/net/mptcp/protocol.c
++++ b/net/mptcp/protocol.c
+@@ -688,6 +688,42 @@ static bool __mptcp_ofo_queue(struct mpt
+       return moved;
+ }
++void __mptcp_error_report(struct sock *sk)
++{
++      struct mptcp_subflow_context *subflow;
++      struct mptcp_sock *msk = mptcp_sk(sk);
++
++      mptcp_for_each_subflow(msk, subflow) {
++              struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
++              int err = sock_error(ssk);
++              int ssk_state;
++
++              if (!err)
++                      continue;
++
++              /* only propagate errors on fallen-back sockets or
++               * on MPC connect
++               */
++              if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(msk))
++                      continue;
++
++              /* We need to propagate only transition to CLOSE state.
++               * Orphaned socket will see such state change via
++               * subflow_sched_work_if_closed() and that path will properly
++               * destroy the msk as needed.
++               */
++              ssk_state = inet_sk_state_load(ssk);
++              if (ssk_state == TCP_CLOSE && !sock_flag(sk, SOCK_DEAD))
++                      inet_sk_state_store(sk, ssk_state);
++              WRITE_ONCE(sk->sk_err, -err);
++
++              /* This barrier is coupled with smp_rmb() in mptcp_poll() */
++              smp_wmb();
++              sk_error_report(sk);
++              break;
++      }
++}
++
+ /* In most cases we will be able to lock the mptcp socket.  If its already
+  * owned, we need to defer to the work queue to avoid ABBA deadlock.
+  */
+--- a/net/mptcp/subflow.c
++++ b/net/mptcp/subflow.c
+@@ -1269,42 +1269,6 @@ void mptcp_space(const struct sock *ssk,
+       *full_space = tcp_full_space(sk);
+ }
+-void __mptcp_error_report(struct sock *sk)
+-{
+-      struct mptcp_subflow_context *subflow;
+-      struct mptcp_sock *msk = mptcp_sk(sk);
+-
+-      mptcp_for_each_subflow(msk, subflow) {
+-              struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
+-              int err = sock_error(ssk);
+-              int ssk_state;
+-
+-              if (!err)
+-                      continue;
+-
+-              /* only propagate errors on fallen-back sockets or
+-               * on MPC connect
+-               */
+-              if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(msk))
+-                      continue;
+-
+-              /* We need to propagate only transition to CLOSE state.
+-               * Orphaned socket will see such state change via
+-               * subflow_sched_work_if_closed() and that path will properly
+-               * destroy the msk as needed.
+-               */
+-              ssk_state = inet_sk_state_load(ssk);
+-              if (ssk_state == TCP_CLOSE && !sock_flag(sk, SOCK_DEAD))
+-                      inet_sk_state_store(sk, ssk_state);
+-              sk->sk_err = -err;
+-
+-              /* This barrier is coupled with smp_rmb() in mptcp_poll() */
+-              smp_wmb();
+-              sk_error_report(sk);
+-              break;
+-      }
+-}
+-
+ static void subflow_error_report(struct sock *ssk)
+ {
+       struct sock *sk = mptcp_subflow_ctx(ssk)->conn;
diff --git a/queue-5.15/mptcp-process-pending-subflow-error-on-close.patch b/queue-5.15/mptcp-process-pending-subflow-error-on-close.patch
new file mode 100644 (file)
index 0000000..3daa181
--- /dev/null
@@ -0,0 +1,117 @@
+From stable+bounces-25403-greg=kroah.com@vger.kernel.org Wed Feb 28 18:33:29 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:33:18 +0100
+Subject: mptcp: process pending subflow error on close
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <martineau@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>, "David S . Miller" <davem@davemloft.net>, Matthieu Baerts <matttbe@kernel.org>
+Message-ID: <20240228173317.257282-2-matttbe@kernel.org>
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+commit 9f1a98813b4b686482e5ef3c9d998581cace0ba6 upstream.
+
+On incoming TCP reset, subflow closing could happen before error
+propagation. That in turn could cause the socket error being ignored,
+and a missing socket state transition, as reported by Daire-Byrne.
+
+Address the issues explicitly checking for subflow socket error at
+close time. To avoid code duplication, factor-out of __mptcp_error_report()
+a new helper implementing the relevant bits.
+
+Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/429
+Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk")
+Cc: stable@vger.kernel.org
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/protocol.c |   63 +++++++++++++++++++++++++++------------------------
+ 1 file changed, 34 insertions(+), 29 deletions(-)
+
+--- a/net/mptcp/protocol.c
++++ b/net/mptcp/protocol.c
+@@ -688,40 +688,44 @@ static bool __mptcp_ofo_queue(struct mpt
+       return moved;
+ }
+-void __mptcp_error_report(struct sock *sk)
++static bool __mptcp_subflow_error_report(struct sock *sk, struct sock *ssk)
+ {
+-      struct mptcp_subflow_context *subflow;
+-      struct mptcp_sock *msk = mptcp_sk(sk);
++      int err = sock_error(ssk);
++      int ssk_state;
+-      mptcp_for_each_subflow(msk, subflow) {
+-              struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
+-              int err = sock_error(ssk);
+-              int ssk_state;
++      if (!err)
++              return false;
+-              if (!err)
+-                      continue;
++      /* only propagate errors on fallen-back sockets or
++       * on MPC connect
++       */
++      if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(mptcp_sk(sk)))
++              return false;
+-              /* only propagate errors on fallen-back sockets or
+-               * on MPC connect
+-               */
+-              if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(msk))
+-                      continue;
++      /* We need to propagate only transition to CLOSE state.
++       * Orphaned socket will see such state change via
++       * subflow_sched_work_if_closed() and that path will properly
++       * destroy the msk as needed.
++       */
++      ssk_state = inet_sk_state_load(ssk);
++      if (ssk_state == TCP_CLOSE && !sock_flag(sk, SOCK_DEAD))
++              inet_sk_state_store(sk, ssk_state);
++      WRITE_ONCE(sk->sk_err, -err);
++
++      /* This barrier is coupled with smp_rmb() in mptcp_poll() */
++      smp_wmb();
++      sk_error_report(sk);
++      return true;
++}
+-              /* We need to propagate only transition to CLOSE state.
+-               * Orphaned socket will see such state change via
+-               * subflow_sched_work_if_closed() and that path will properly
+-               * destroy the msk as needed.
+-               */
+-              ssk_state = inet_sk_state_load(ssk);
+-              if (ssk_state == TCP_CLOSE && !sock_flag(sk, SOCK_DEAD))
+-                      inet_sk_state_store(sk, ssk_state);
+-              WRITE_ONCE(sk->sk_err, -err);
+-
+-              /* This barrier is coupled with smp_rmb() in mptcp_poll() */
+-              smp_wmb();
+-              sk_error_report(sk);
+-              break;
+-      }
++void __mptcp_error_report(struct sock *sk)
++{
++      struct mptcp_subflow_context *subflow;
++      struct mptcp_sock *msk = mptcp_sk(sk);
++
++      mptcp_for_each_subflow(msk, subflow)
++              if (__mptcp_subflow_error_report(sk, mptcp_subflow_tcp_sock(subflow)))
++                      break;
+ }
+ /* In most cases we will be able to lock the mptcp socket.  If its already
+@@ -2309,6 +2313,7 @@ static void __mptcp_close_ssk(struct soc
+               /* close acquired an extra ref */
+               __sock_put(ssk);
+       }
++      __mptcp_subflow_error_report(sk, ssk);
+       release_sock(ssk);
+       sock_put(ssk);
diff --git a/queue-5.15/mptcp-rename-timer-related-helper-to-less-confusing-names.patch b/queue-5.15/mptcp-rename-timer-related-helper-to-less-confusing-names.patch
new file mode 100644 (file)
index 0000000..1bfa252
--- /dev/null
@@ -0,0 +1,137 @@
+From stable+bounces-25404-greg=kroah.com@vger.kernel.org Wed Feb 28 18:34:38 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:33:56 +0100
+Subject: mptcp: rename timer related helper to less confusing names
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Paolo Abeni <pabeni@redhat.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <martineau@kernel.org>, "David S . Miller" <davem@davemloft.net>, Matthieu Baerts <matttbe@kernel.org>
+Message-ID: <20240228173355.258080-2-matttbe@kernel.org>
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+commit f6909dc1c1f4452879278128012da6c76bc186a5 upstream.
+
+The msk socket uses to different timeout to track close related
+events and retransmissions. The existing helpers do not indicate
+clearly which timer they actually touch, making the related code
+quite confusing.
+
+Change the existing helpers name to avoid such confusion. No
+functional change intended.
+
+This patch is linked to the next one ("mptcp: fix dangling connection
+hang-up"). The two patches are supposed to be backported together.
+
+Cc: stable@vger.kernel.org # v5.11+
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Reviewed-by: Mat Martineau <martineau@kernel.org>
+Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/protocol.c |   32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+--- a/net/mptcp/protocol.c
++++ b/net/mptcp/protocol.c
+@@ -330,7 +330,7 @@ drop:
+       return false;
+ }
+-static void mptcp_stop_timer(struct sock *sk)
++static void mptcp_stop_rtx_timer(struct sock *sk)
+ {
+       struct inet_connection_sock *icsk = inet_csk(sk);
+@@ -830,12 +830,12 @@ static void mptcp_flush_join_list(struct
+       mptcp_sockopt_sync_all(msk);
+ }
+-static bool mptcp_timer_pending(struct sock *sk)
++static bool mptcp_rtx_timer_pending(struct sock *sk)
+ {
+       return timer_pending(&inet_csk(sk)->icsk_retransmit_timer);
+ }
+-static void mptcp_reset_timer(struct sock *sk)
++static void mptcp_reset_rtx_timer(struct sock *sk)
+ {
+       struct inet_connection_sock *icsk = inet_csk(sk);
+       unsigned long tout;
+@@ -1145,10 +1145,10 @@ out:
+               __mptcp_mem_reclaim_partial(sk);
+       if (snd_una == READ_ONCE(msk->snd_nxt) && !msk->recovery) {
+-              if (mptcp_timer_pending(sk) && !mptcp_data_fin_enabled(msk))
+-                      mptcp_stop_timer(sk);
++              if (mptcp_rtx_timer_pending(sk) && !mptcp_data_fin_enabled(msk))
++                      mptcp_stop_rtx_timer(sk);
+       } else {
+-              mptcp_reset_timer(sk);
++              mptcp_reset_rtx_timer(sk);
+       }
+ }
+@@ -1640,8 +1640,8 @@ void __mptcp_push_pending(struct sock *s
+ out:
+       /* ensure the rtx timer is running */
+-      if (!mptcp_timer_pending(sk))
+-              mptcp_reset_timer(sk);
++      if (!mptcp_rtx_timer_pending(sk))
++              mptcp_reset_rtx_timer(sk);
+       if (copied)
+               mptcp_check_send_data_fin(sk);
+ }
+@@ -1700,8 +1700,8 @@ out:
+       if (copied) {
+               tcp_push(ssk, 0, info.mss_now, tcp_sk(ssk)->nonagle,
+                        info.size_goal);
+-              if (!mptcp_timer_pending(sk))
+-                      mptcp_reset_timer(sk);
++              if (!mptcp_rtx_timer_pending(sk))
++                      mptcp_reset_rtx_timer(sk);
+               if (msk->snd_data_fin_enable &&
+                   msk->snd_nxt + 1 == msk->write_seq)
+@@ -2173,7 +2173,7 @@ static void mptcp_retransmit_timer(struc
+       sock_put(sk);
+ }
+-static void mptcp_timeout_timer(struct timer_list *t)
++static void mptcp_tout_timer(struct timer_list *t)
+ {
+       struct sock *sk = from_timer(sk, t, sk_timer);
+@@ -2465,8 +2465,8 @@ static void __mptcp_retrans(struct sock
+       release_sock(ssk);
+ reset_timer:
+-      if (!mptcp_timer_pending(sk))
+-              mptcp_reset_timer(sk);
++      if (!mptcp_rtx_timer_pending(sk))
++              mptcp_reset_rtx_timer(sk);
+ }
+ static void mptcp_worker(struct work_struct *work)
+@@ -2543,7 +2543,7 @@ static int __mptcp_init_sock(struct sock
+       /* re-use the csk retrans timer for MPTCP-level retrans */
+       timer_setup(&msk->sk.icsk_retransmit_timer, mptcp_retransmit_timer, 0);
+-      timer_setup(&sk->sk_timer, mptcp_timeout_timer, 0);
++      timer_setup(&sk->sk_timer, mptcp_tout_timer, 0);
+       return 0;
+ }
+@@ -2629,8 +2629,8 @@ void mptcp_subflow_shutdown(struct sock
+               } else {
+                       pr_debug("Sending DATA_FIN on subflow %p", ssk);
+                       tcp_send_ack(ssk);
+-                      if (!mptcp_timer_pending(sk))
+-                              mptcp_reset_timer(sk);
++                      if (!mptcp_rtx_timer_pending(sk))
++                              mptcp_reset_rtx_timer(sk);
+               }
+               break;
+       }
diff --git a/queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch b/queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch
new file mode 100644 (file)
index 0000000..03a99ab
--- /dev/null
@@ -0,0 +1,40 @@
+From stable+bounces-25406-greg=kroah.com@vger.kernel.org Wed Feb 28 18:35:51 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:35:23 +0100
+Subject: selftests: mptcp: add missing kconfig for NF Filter in v6
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Geliang Tang <geliang@kernel.org>, Jakub Kicinski <kuba@kernel.org>
+Message-ID: <20240228173522.259824-2-matttbe@kernel.org>
+
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+
+commit 8c86fad2cecdc6bf7283ecd298b4d0555bd8b8aa upstream.
+
+Since the commit mentioned below, 'mptcp_join' selftests is using
+IPTables to add rules to the Filter table for IPv6.
+
+It is then required to have IP6_NF_FILTER KConfig.
+
+This KConfig is usually enabled by default in many defconfig, but we
+recently noticed that some CI were running our selftests without them
+enabled.
+
+Fixes: 523514ed0a99 ("selftests: mptcp: add ADD_ADDR IPv6 test cases")
+Cc: stable@vger.kernel.org
+Reviewed-by: Geliang Tang <geliang@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-3-4c1c11e571ff@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/mptcp/config |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/testing/selftests/net/mptcp/config
++++ b/tools/testing/selftests/net/mptcp/config
+@@ -18,3 +18,4 @@ CONFIG_NETFILTER_XT_MATCH_BPF=m
+ CONFIG_NF_TABLES_IPV4=y
+ CONFIG_NF_TABLES_IPV6=y
+ CONFIG_IP_NF_FILTER=m
++CONFIG_IP6_NF_FILTER=m
diff --git a/queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter.patch b/queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter.patch
new file mode 100644 (file)
index 0000000..399daec
--- /dev/null
@@ -0,0 +1,39 @@
+From stable+bounces-25405-greg=kroah.com@vger.kernel.org Wed Feb 28 18:35:15 2024
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+Date: Wed, 28 Feb 2024 18:34:36 +0100
+Subject: selftests: mptcp: add missing kconfig for NF Filter
+To: stable@vger.kernel.org, gregkh@linuxfoundation.org
+Cc: MPTCP Upstream <mptcp@lists.linux.dev>, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Geliang Tang <geliang@kernel.org>, Jakub Kicinski <kuba@kernel.org>
+Message-ID: <20240228173435.258891-2-matttbe@kernel.org>
+
+From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
+
+commit 3645c844902bd4e173d6704fc2a37e8746904d67 upstream.
+
+Since the commit mentioned below, 'mptcp_join' selftests is using
+IPTables to add rules to the Filter table.
+
+It is then required to have IP_NF_FILTER KConfig.
+
+This KConfig is usually enabled by default in many defconfig, but we
+recently noticed that some CI were running our selftests without them
+enabled.
+
+Fixes: 8d014eaa9254 ("selftests: mptcp: add ADD_ADDR timeout test case")
+Cc: stable@vger.kernel.org
+Reviewed-by: Geliang Tang <geliang@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/mptcp/config |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/testing/selftests/net/mptcp/config
++++ b/tools/testing/selftests/net/mptcp/config
+@@ -17,3 +17,4 @@ CONFIG_NETFILTER_XTABLES=m
+ CONFIG_NETFILTER_XT_MATCH_BPF=m
+ CONFIG_NF_TABLES_IPV4=y
+ CONFIG_NF_TABLES_IPV6=y
++CONFIG_IP_NF_FILTER=m
index f45301e3adbc2e27d952df81e5a4869395328e0e..05ff16a30c7ad7993577f1e6244e57ca1e54b120 100644 (file)
@@ -59,3 +59,10 @@ riscv-add-caller_addrx-support.patch
 pmdomain-qcom-rpmhpd-fix-enabled_corner-aggregation.patch
 fs-aio-make-io_cancel-generate-completions-again.patch
 x86-cpu-intel-detect-tme-keyid-bits-before-setting-mtrr-mask-registers.patch
+mptcp-move-__mptcp_error_report-in-protocol.c.patch
+mptcp-process-pending-subflow-error-on-close.patch
+mptcp-rename-timer-related-helper-to-less-confusing-names.patch
+selftests-mptcp-add-missing-kconfig-for-nf-filter.patch
+selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch
+mptcp-clean-up-harmless-false-expressions.patch
+mptcp-add-needs_id-for-netlink-appending-addr.patch