From: Simon Horman <horms@kernel•org>
To: Xiang Mei <xmei5@asu•edu>
Cc: netdev@vger•kernel.org, bridge@lists•linux.dev,
razor@blackwall•org, idosch@nvidia•com, davem@davemloft•net,
edumazet@google•com, pabeni@redhat•com, bestswngs@gmail•com
Subject: Re: [PATCH net] bridge: mrp: reject zero test interval to avoid OOM panic
Date: Fri, 27 Mar 2026 11:34:12 +0000 [thread overview]
Message-ID: <20260327113412.GD567789@horms.kernel.org> (raw)
In-Reply-To: <20260326032438.3307549-1-xmei5@asu.edu>
On Wed, Mar 25, 2026 at 08:24:38PM -0700, Xiang Mei wrote:
> br_mrp_start_test() and br_mrp_start_in_test() accept the user-supplied
> interval value from netlink without validation. When interval is 0,
> usecs_to_jiffies(0) yields 0, causing the delayed work
> (br_mrp_test_work_expired / br_mrp_in_test_work_expired) to reschedule
> itself with zero delay. This creates a tight loop on system_percpu_wq
> that allocates and transmits MRP test frames at maximum rate, exhausting
> all system memory and causing a kernel panic via OOM deadlock.
I would suspect the primary outcome of this problem is high CPU consumption
rather than memory exhaustion. Is there a reason to expect that
the transmitted fames can't be consumed as fast as they are created?
>
> The same zero-interval issue applies to br_mrp_start_in_test_parse()
> for interconnect test frames.
>
> Use NLA_POLICY_MIN(NLA_U32, 1) in the nla_policy tables for both
> IFLA_BRIDGE_MRP_START_TEST_INTERVAL and
> IFLA_BRIDGE_MRP_START_IN_TEST_INTERVAL, so zero is rejected at the
> netlink attribute parsing layer before the value ever reaches the
> workqueue scheduling code. This is consistent with how other bridge
> subsystems (br_fdb, br_mst) enforce range constraints on netlink
> attributes.
>
> Fixes: 7ab1748e4ce6 ("bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect")
I think you also want
Fixes: 20f6a05ef635 ("bridge: mrp: Rework the MRP netlink interface")
As highlighted by AI review.
> Reported-by: Weiming Shi <bestswngs@gmail•com>
> Signed-off-by: Xiang Mei <xmei5@asu•edu>
...
next prev parent reply other threads:[~2026-03-27 11:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 3:24 [PATCH net] bridge: mrp: reject zero test interval to avoid OOM panic Xiang Mei
2026-03-26 3:42 ` Xiang Mei
2026-03-27 11:34 ` Simon Horman [this message]
2026-03-27 11:46 ` Nikolay Aleksandrov
2026-03-28 0:19 ` Jakub Kicinski
2026-03-28 6:18 ` Nikolay Aleksandrov
2026-03-28 6:23 ` Xiang Mei
2026-03-28 6:19 ` Xiang Mei
2026-03-28 6:38 ` Nikolay Aleksandrov
2026-04-03 8:34 ` Simon Horman
2026-04-04 0:31 ` Xiang Mei
2026-03-28 6:06 ` Xiang Mei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260327113412.GD567789@horms.kernel.org \
--to=horms@kernel$(echo .)org \
--cc=bestswngs@gmail$(echo .)com \
--cc=bridge@lists$(echo .)linux.dev \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=idosch@nvidia$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=razor@blackwall$(echo .)org \
--cc=xmei5@asu$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox