mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Moshe Shemesh <moshe@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
	"Jiri Pirko" <jiri@nvidia.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] devlink: Hold devlink lock on health reporter dump get
Date: Thu, 5 Oct 2023 14:59:35 +0300	[thread overview]
Message-ID: <312bc0c1-94c1-dea7-917a-079381634f3a@nvidia.com> (raw)
In-Reply-To: <20231004163929.70977d05@kernel.org>



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

      reply	other threads:[~2023-10-05 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-01 15:19 Moshe Shemesh
2023-10-03 11:36 ` Simon Horman
2023-10-04 23:39 ` Jakub Kicinski
2023-10-05 11:59   ` Moshe Shemesh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=312bc0c1-94c1-dea7-917a-079381634f3a@nvidia.com \
    --to=moshe@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®