diff options
| author | Florian Fainelli <florian.fainelli@broadcom.com> | 2026-08-25 12:16:19 -0700 |
|---|---|---|
| committer | Jassi Brar <jassisinghbrar@gmail.com> | 2026-10-11 20:08:16 -0500 |
| commit | eb2ee504757674450a5e03e36e6b9340f064e599 (patch) | |
| tree | d234db151a418aab8337cf81eb1673f141e6f44f /include/uapi/linux | |
| parent | 86976f7cc324aac254136a352f74ac17f21e574c (diff) | |
| download | linux-next-eb2ee504757674450a5e03e36e6b9340f064e599.tar.gz linux-next-eb2ee504757674450a5e03e36e6b9340f064e599.zip | |
mailbox: bcm74110: Cap rx_svc_init_list growth to prevent PMC-induced OOM
bcm74110_rx_push_init_msg() allocates a GFP_ATOMIC struct for every
BCM_MSG_SVC_INIT word received from the PMC co-processor and appends it
to rx_svc_init_list with no cap on list length. The only consumers of
this list (bcm74110_rx_pop_init_msg_block / bcm74110_rx_flush_msg) are
called only during probe and at shutdown respectively; after probe
completes, PMC firmware can continuously inject BCM_MSG_SVC_INIT words,
exhausting GFP_ATOMIC reserves and causing a whole-device denial of
service.
Add BCM74110_INIT_MSG_MAX (16 entries) as the maximum list depth.
bcm74110_rx_push_init_msg() now checks the count under the existing
rx_svc_list_lock before allocating; if the cap is reached the message is
dropped and a rate-limited warning is emitted. The new rx_svc_init_count
field is decremented by bcm74110_rx_pop_init_msg() on successful dequeue
and reset to zero by bcm74110_rx_flush_msg() on shutdown.
Fixes: 52436007b862 ("mailbox: Add support for bcm74110")
Cc: stable@vger.kernel.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Assisted-by: Anthropic:claude-sonnet-4.6 cursor
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
Acked-by: Justin Chen <justin.chen@broadcom.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
