FAILED: patch "[PATCH] net: l2tp: do not propagate multicast notification errors" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x af20e269f7459d2ce69887fdf2fad7caf986c865
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090341-cubicle-cattishly-1b0e@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From af20e269f7459d2ce69887fdf2fad7caf986c865 Mon Sep 17 00:00:00 2001
From: Zihan Xi <[email protected]>
Date: Thu, 20 Aug 2026 18:40:28 +0000
Subject: [PATCH] net: l2tp: do not propagate multicast notification errors
The tunnel create, tunnel modify, session create, and session modify netlink handlers send multicast notifications through helpers that can fail while allocating or encoding a message, or while multicasting it.
For tunnel and session create/modify, a notification is sent after the live operation has completed. Returning a best-effort notification error as the command result can therefore report failure for an operation that already committed and can cause callers to retry and accumulate live objects.
Keep sending notifications for listener visibility, but do not propagate their best-effort status as the command result. This also keeps the tunnel modify command consistent with the other notification-only paths.
net/l2tp/l2tp_netlink.c +8 -8
@@ -251,8 +251,8 @@ static int l2tp_nl_cmd_tunnel_create(struct sk_buff *skb, struct genl_info *infokfree (tunnel); goto out; } - ret =l2tp_tunnel_notify (&l2tp_nl_family, info, tunnel, -L2TP_CMD_TUNNEL_CREATE ); +l2tp_tunnel_notify (&l2tp_nl_family, info, tunnel, +L2TP_CMD_TUNNEL_CREATE );l2tp_tunnel_put (tunnel); out:
@@ -308,8 +308,8 @@ static int l2tp_nl_cmd_tunnel_modify(struct sk_buff *skb, struct genl_info *info goto out; } - ret =l2tp_tunnel_notify (&l2tp_nl_family, info, - tunnel,L2TP_CMD_TUNNEL_MODIFY ); +l2tp_tunnel_notify (&l2tp_nl_family, info, + tunnel,L2TP_CMD_TUNNEL_MODIFY );l2tp_tunnel_put (tunnel);
@@ -648,8 +648,8 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf session =l2tp_session_get (net, tunnel->sock, tunnel->version, tunnel_id, session_id);if (session) { - ret =l2tp_session_notify (&l2tp_nl_family, info, session, -L2TP_CMD_SESSION_CREATE ); +l2tp_session_notify (&l2tp_nl_family, info, session, +L2TP_CMD_SESSION_CREATE );l2tp_session_put (session); } }
@@ -713,8 +713,8 @@ static int l2tp_nl_cmd_session_modify(struct sk_buff *skb, struct genl_info *infif (info->attrs[L2TP_ATTR_RECV_TIMEOUT ]) session->reorder_timeout =nla_get_msecs (info->attrs[L2TP_ATTR_RECV_TIMEOUT ]); - ret =l2tp_session_notify (&l2tp_nl_family, info, - session,L2TP_CMD_SESSION_MODIFY ); +l2tp_session_notify (&l2tp_nl_family, info, + session,L2TP_CMD_SESSION_MODIFY );l2tp_session_put (session);
Sasha Levin
maintainerPATCH 1/1 net: l2tp: do not propagate multicast notification errors
From: Zihan Xi <[email protected]>
[ Upstream commit af20e269f7459d2ce69887fdf2fad7caf986c865 ]
The tunnel create, tunnel modify, session create, and session modify netlink handlers send multicast notifications through helpers that can fail while allocating or encoding a message, or while multicasting it.
For tunnel and session create/modify, a notification is sent after the live operation has completed. Returning a best-effort notification error as the command result can therefore report failure for an operation that already committed and can cause callers to retry and accumulate live objects.
Keep sending notifications for listener visibility, but do not propagate their best-effort status as the command result. This also keeps the tunnel modify command consistent with the other notification-only paths.
--- net/l2tp/l2tp_netlink.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
net/l2tp/l2tp_netlink.c +8 -8
@@ -247,8 +247,8 @@ static int l2tp_nl_cmd_tunnel_create(struct sk_buff *skb, struct genl_info *infokfree (tunnel); goto out; } - ret =l2tp_tunnel_notify (&l2tp_nl_family, info, tunnel, -L2TP_CMD_TUNNEL_CREATE ); +l2tp_tunnel_notify (&l2tp_nl_family, info, tunnel, +L2TP_CMD_TUNNEL_CREATE );l2tp_tunnel_dec_refcount (tunnel); out:
@@ -304,8 +304,8 @@ static int l2tp_nl_cmd_tunnel_modify(struct sk_buff *skb, struct genl_info *info goto out; } - ret =l2tp_tunnel_notify (&l2tp_nl_family, info, - tunnel,L2TP_CMD_TUNNEL_MODIFY ); +l2tp_tunnel_notify (&l2tp_nl_family, info, + tunnel,L2TP_CMD_TUNNEL_MODIFY );l2tp_tunnel_dec_refcount (tunnel);
@@ -637,8 +637,8 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *infif (ret >=0 ) { session =l2tp_tunnel_get_session (tunnel, session_id);if (session) { - ret =l2tp_session_notify (&l2tp_nl_family, info, session, -L2TP_CMD_SESSION_CREATE ); +l2tp_session_notify (&l2tp_nl_family, info, session, +L2TP_CMD_SESSION_CREATE );l2tp_session_dec_refcount (session); } }
@@ -700,8 +700,8 @@ static int l2tp_nl_cmd_session_modify(struct sk_buff *skb, struct genl_info *infif (info->attrs[L2TP_ATTR_RECV_TIMEOUT ]) session->reorder_timeout =nla_get_msecs (info->attrs[L2TP_ATTR_RECV_TIMEOUT ]); - ret =l2tp_session_notify (&l2tp_nl_family, info, - session,L2TP_CMD_SESSION_MODIFY ); +l2tp_session_notify (&l2tp_nl_family, info, + session,L2TP_CMD_SESSION_MODIFY );l2tp_session_dec_refcount (session);
Signature · 1 line
2.53.0