Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Nikolay Aleksandrov
Sun, 22 Nov 2026 10:23
Re: [PATCH net 1/2] bridge: mcast: Fix source list rollback on failure
Author: Nikolay Aleksandrov
Date: Sun, 22 Nov 2026 10:23
Date: Sun, 22 Nov 2026 10:23
45 lines
13116 bytes
13116 bytes
On 22/11/2026 09:25, Ido Schimmel wrote:
> When the bridge fails to add or replace an MDB entry with a source list,
> br_mdb_add_group_srcs() rolls back the operation by looking up and
> deleting the source entries of all the sources that were already
> processed. This is wrong for two reasons.
>
> First, with NLM_F_REPLACE, a source can appear more than once in the
> source list. Its source entry is deleted when rolling back one
> occurrence and the lookup fails for the other, triggering a
> WARN_ON_ONCE() [1].
>
> Second, when replacing an existing entry fails, sources from the new
> source list that already existed before the replace are deleted together
> with their (S, G) entries instead of being kept.
>
> Fix by marking source entries that were created by the current operation
> and only deleting them on failure.
>
> [1]
> WARNING: net/bridge/br_mdb.c:901 at br_mdb_add_group_srcs+0x310/0x440, CPU#10: repro/304
> [...]
> RIP: 0010:br_mdb_add_group_srcs (net/bridge/br_mdb.c:901 (discriminator 2) net/bridge/br_mdb.c:924 (discriminator 2))
> [...]
> Call Trace:
> <TASK>
> br_mdb_add_group_star_g (net/bridge/br_mdb.c:1021)
> br_mdb_add_group (net/bridge/br_mdb.c:1082)
> br_mdb_add (net/bridge/br_mdb.c:1097 net/bridge/br_mdb.c:1360)
> rtnl_mdb_add (net/core/rtnetlink.c:6925)
> rtnetlink_rcv_msg (net/core/rtnetlink.c:7178)
> [...]
>
> Fixes: 61f2183512a7 ("bridge: mcast: Support replacement of MDB port group entries")
> Cc: stable@vger.kernel.org
> Reported-by: Kyuwon Cho <kyuwoncho18@gmail.com>
> Closes: https://lore.kernel.org/netdev/179489219555.3099318.10297266282803881244@gmail.com/
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
> net/bridge/br_mdb.c | 29 ++++++++++++++---------------
> net/bridge/br_private.h | 1 +
> 2 files changed, 15 insertions(+), 15 deletions(-)
>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads