summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorJunxian Huang <huangjunxian6@hisilicon.com>2026-06-13 18:20:45 +0800
committerJason Gunthorpe <jgg@nvidia.com>2026-06-16 15:04:55 -0300
commitc0bd03b850d81a8914168d87ddf7f6ffa58875ef (patch)
treec90216acfc3df8201fa79c1a6151334725523278 /drivers/phy/eswin/git@git.tavy.me:linux.git
parent963af8d97a8c6a117134a8d0db1415e0489200b1 (diff)
RDMA/hns: Fix memory leak of bonding resources
In a corner case of concurrent driver removal and driver reset, bonding resource is first released in hns_roce_hw_v2_exit() during driver removal, and then is allocated again in hns_roce_register_device() during driver reset. This leads to memory leak because the release timing has already passed. This may also lead to a kernel panic as below because of the leaked notifier callback: Call trace: 0xffffa20fccc04978 (P) raw_notifier_call_chain+0x20/0x38 call_netdevice_notifiers_info+0x60/0xb8 netdev_lower_state_changed+0x4c/0xb8 As Sashiko suggested, the teardown order of bonding resources should be inverted to make sure the resources are released when the driver is removed. Fixes: b37ad2e290fc ("RDMA/hns: Initialize bonding resources") Link: https://patch.msgid.link/r/20260613102045.811623-1-huangjunxian6@hisilicon.com Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions