netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Íñigo Huguet" <ihuguet@redhat.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	irusskikh@marvell.com, dbogdanov@marvell.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org, Li Liang <liali@redhat.com>
Subject: Re: [PATCH net] atlantic: fix deadlock at aq_nic_stop
Date: Wed, 19 Oct 2022 08:39:13 -0700	[thread overview]
Message-ID: <20221019083913.09437041@kernel.org> (raw)
In-Reply-To: <CACT4oud9B-yCD5jVWRt9c4JXq2_Ap-qMkr9y3xJ5cgTTggYT1w@mail.gmail.com>

On Wed, 19 Oct 2022 08:18:29 +0200 Íñigo Huguet wrote:
> Yes, now I get it.
> 
> However, I think I won't use this strategy this time: rtnl_lock is
> only needed in the work task if IS_ENABLED(CONFIG_MACSEC). Acquiring
> rtnl_lock every time if macsec is not enabled wouldn't be protecting
> anything, so it would be a waste. I think that the strategy suggested
> by Andrew of adding a dedicated mutex to protect atlantic's macsec
> operations makes more sense in this case. Do you agree?

Dunno, locks don't protect operations, they protect state (as the link
Andrew sent probably explains?), so it's hard to say how easily you can
inject a new lock into this driver covering relevant bits. My gut
feeling is that refcounting would be less error prone. But I don't feel
strongly enough to force one choice over the other.

  reply	other threads:[~2022-10-19 15:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 10:34 [PATCH net] atlantic: fix deadlock at aq_nic_stop Íñigo Huguet
2022-10-14 12:13 ` Andrew Lunn
2022-10-14 12:43   ` Íñigo Huguet
2022-10-14 13:35     ` Andrew Lunn
2022-10-14 13:44       ` Íñigo Huguet
2022-10-15 15:09         ` Andrew Lunn
2022-10-17  7:22           ` Íñigo Huguet
2022-10-18  0:27             ` Andrew Lunn
2022-10-18  2:44               ` Jakub Kicinski
2022-10-18  6:15                 ` Íñigo Huguet
2022-10-18 15:59                   ` Jakub Kicinski
2022-10-19  6:18                     ` Íñigo Huguet
2022-10-19 15:39                       ` Jakub Kicinski [this message]
2022-10-20  7:46                         ` Íñigo Huguet
2022-10-18  6:11               ` Íñigo Huguet
2022-10-20  7:53 ` [PATCH v2 " Íñigo Huguet
2022-10-20  8:55   ` Igor Russkikh
2022-10-20 16:17     ` Íñigo Huguet
2022-10-21 19:01     ` Íñigo Huguet
2022-10-24  9:30   ` patchwork-bot+netdevbpf

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=20221019083913.09437041@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dbogdanov@marvell.com \
    --cc=edumazet@google.com \
    --cc=ihuguet@redhat.com \
    --cc=irusskikh@marvell.com \
    --cc=liali@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).