Re: [PATCH net] devlink: Hold devlink lock on health reporter dump get
From: Moshe Shemesh
Date: Thu Oct 05 2023 - 09:59:20 EST
On 10/5/2023 2:39 AM, Jakub Kicinski wrote:
External email: Use caution opening links or attachments
On Sun, 1 Oct 2023 18:19:40 +0300 Moshe Shemesh wrote:
Devlink health dump get callback should take devlink lock as any other
devlink callback. Add devlink lock to the callback and to any call for
devlink_health_do_dump().
As devlink lock is added to any callback of dump, the reporter dump_lock
is now redundant and can be removed.
I love the change but it needs more info in the commit message :)
1. what exact / example but real problem are you solving?
Sure, will send v2
2. some words of reassurance that you checked all the drivers
and the locking change should be safe (none of them take
instance locks in reporter callbacks etc)
That's what I checked, looking at the code, I didn't find any devlink
instance lock through all drivers health dump callbacks in current code:
bnxt_fw_dump(), hinic_hw_reporter_dump(), hinic_fw_reporter_dump(),
rvu_hw_nix_intr_dump() , rvu_hw_nix_gen_dump(), rvu_hw_nix_err_dump(),
rvu_hw_nix_ras_dump(), rvu_hw_npa_intr_dump(), rvu_hw_npa_gen_dump(),
rvu_hw_npa_err_dump(), rvu_hw_npa_ras_dump(),
mlxsw_core_health_fw_fatal_dump(), mlx5e_rx_reporter_dump(),
mlx5e_tx_reporter_dump(), mlx5_fw_reporter_dump(),
mlx5_fw_fatal_reporter_dump(), qed_fw_fatal_reporter_dump(),
nsim_dev_empty_reporter_dump(), nsim_dev_dummy_reporter_dump(),
qlge_reporter_coredump()
--
pw-bot: cr