public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Cosmin Ratiu <cratiu@nvidia.com>
To: "stfomichev@gmail.com" <stfomichev@gmail.com>
Cc: "kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"sdf@fomichev.me" <sdf@fomichev.me>
Subject: Re: Sleeping in atomic context with VLAN and netdev instance lock drivers
Date: Sat, 19 Jul 2025 10:23:21 +0000	[thread overview]
Message-ID: <d7555a08d9c44ab89161c400119b3edf28043a74.camel@nvidia.com> (raw)
In-Reply-To: <aHZ54sAfzIe0rmCd@mini-arch>

On Tue, 2025-07-15 at 08:55 -0700, Stanislav Fomichev wrote:
> 
> Thanks for the report, I was looking at similar issue in [0] and for
> macsec I was thinking about the following:
> 
> diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
> index 7edbe76b5455..4c75d1fea552 100644
> --- a/drivers/net/macsec.c
> +++ b/drivers/net/macsec.c
> @@ -3868,7 +3868,7 @@ static void macsec_setup(struct net_device
> *dev)
>  	ether_setup(dev);
>  	dev->min_mtu = 0;
>  	dev->max_mtu = ETH_MAX_MTU;
> -	dev->priv_flags |= IFF_NO_QUEUE;
> +	dev->priv_flags |= IFF_NO_QUEUE | IFF_UNICAST_FLT;
>  	dev->netdev_ops = &macsec_netdev_ops;
>  	dev->needs_free_netdev = true;
>  	dev->priv_destructor = macsec_free_netdev;
> 
> macsec has an ndo_set_rx_mode handler that propagates the uc list so
> not sure why it lacks IFF_UNICAST_FLT.
> 
> This is not a systemic fix, but I guess with the limited number of
> stacking devices, that should do? If that fixes the issue for you,
> I can send a patch..
> 
> 0:
> https://lore.kernel.org/netdev/686d55b4.050a0220.1ffab7.0014.GAE@google.com/

I tested, this works, thank you.
I guess avoiding nested calls requiring the instance lock while holding
the spinlock is one way of avoiding the problem. Looking forward to the
fix.

Thank you,
Cosmin.

      reply	other threads:[~2025-07-19 10:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 15:04 Sleeping in atomic context with VLAN and netdev instance lock drivers Cosmin Ratiu
2025-07-15 15:55 ` Stanislav Fomichev
2025-07-19 10:23   ` Cosmin Ratiu [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=d7555a08d9c44ab89161c400119b3edf28043a74.camel@nvidia.com \
    --to=cratiu@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \
    --cc=stfomichev@gmail.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