]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/hns: Fix log flood after cmd_mbox failure
authorLianfa Weng <wenglianfa@huawei.com>
Wed, 20 May 2026 05:57:59 +0000 (13:57 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 25 May 2026 14:39:04 +0000 (11:39 -0300)
commitbbd97d71e53e551890e4115ad9de46b5f2ac0858
tree99fd72b05c1ee19f3fc1f5387adb5770b0e44b59
parent3f19c2a3852e6ba75f3e92dd5edc4e07f3d07f4a
RDMA/hns: Fix log flood after cmd_mbox failure

hns_roce_cmd_mbox() is the command interface between driver and
hardware. When hardware is abnormal, the unlimited error printings
after hns_roce_cmd_mbox() failure will cause log flood and even
system crash.

Replace ibdev_err() and ibdev_warn() with their ratelimited versions
in the error handling path after hns_roce_cmd_mbox() (and its wrappers
hns_roce_create_hw_ctx/hns_roce_destroy_hw_ctx) fails.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://patch.msgid.link/r/20260520055759.2354037-4-huangjunxian6@hisilicon.com
Signed-off-by: Lianfa Weng <wenglianfa@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_cq.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_mr.c
drivers/infiniband/hw/hns/hns_roce_srq.c