]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: enetc: add ratelimiting to VF mailbox error messages
authorWei Fang <wei.fang@nxp.com>
Wed, 20 May 2026 06:44:15 +0000 (14:44 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 21 May 2026 15:48:59 +0000 (08:48 -0700)
commit4a995d37b537f437daa01752d39cf44c6ba9ee2c
tree9fbd57e8c9e11512cb2626ce150fd4895e6b455d
parent5027266dea471e140f93dd534845c9c4f43219a3
net: enetc: add ratelimiting to VF mailbox error messages

Sashiko reported that a buggy or malicious guest VM can flood the host
kernel log by repeatedly sending VF-to-PF messages at a high rate,
degrading host performance and hiding important system logs [1].

Fix by replacing dev_err()/dev_warn() with dev_err_ratelimited(),
limiting output to the default kernel ratelimit. This ensures errors are
still logged for debugging while preventing log flooding attacks.

Link: https://sashiko.dev/#/patchset/20260511080805.2052495-1-wei.fang%40nxp.com
Fixes: beb74ac878c8 ("enetc: Add vf to pf messaging support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com>
Link: https://patch.msgid.link/20260520064421.91569-4-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_pf.c