netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <pabeni@redhat.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <horms@kernel.org>,
	<kuba@kernel.org>, <kuni1840@gmail.com>, <kuniyu@amazon.com>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH v1 net-next 0/2] dev: Hold per-netns RTNL in register_netdev().
Date: Wed, 8 Jan 2025 15:10:50 +0900	[thread overview]
Message-ID: <20250108061050.9328-1-kuniyu@amazon.com> (raw)
In-Reply-To: <3fe814ea-ede2-415a-8b3e-e09a29e4218d@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Tue, 7 Jan 2025 13:55:51 +0100
> On 1/4/25 9:21 AM, Kuniyuki Iwashima wrote:
> > Patch 1 adds rtnl_net_lock_killable() and Patch 2 uses it in
> > register_netdev() and converts it and unregister_netdev() to
> > per-netns RTNL.
> > 
> > With this and the netdev notifier series [0], ASSERT_RTNL_NET()
> > for NETDEV_REGISTER [1] wasn't fired on a simplest QEMU setup
> > like e1000 + x86_64_defconfig + CONFIG_DEBUG_NET_SMALL_RTNL.
> > 
> > [0]: https://lore.kernel.org/netdev/20250104063735.36945-1-kuniyu@amazon.com/
> > 
> > [1]:
> > ---8<---
> > diff --git a/net/core/rtnl_net_debug.c b/net/core/rtnl_net_debug.c
> > index f406045cbd0e..c0c30929002e 100644
> > --- a/net/core/rtnl_net_debug.c
> > +++ b/net/core/rtnl_net_debug.c
> > @@ -21,7 +21,6 @@ static int rtnl_net_debug_event(struct notifier_block *nb,
> >  	case NETDEV_DOWN:
> >  	case NETDEV_REBOOT:
> >  	case NETDEV_CHANGE:
> > -	case NETDEV_REGISTER:
> >  	case NETDEV_UNREGISTER:
> >  	case NETDEV_CHANGEMTU:
> >  	case NETDEV_CHANGEADDR:
> > @@ -60,19 +59,10 @@ static int rtnl_net_debug_event(struct notifier_block *nb,
> >  		ASSERT_RTNL();
> >  		break;
> >  
> > -	/* Once an event fully supports RTNL_NET, move it here
> > -	 * and remove "if (0)" below.
> > -	 *
> > -	 * case NETDEV_XXX:
> > -	 *	ASSERT_RTNL_NET(net);
> > -	 *	break;
> > -	 */
> > -	}
> > -
> > -	/* Just to avoid unused-variable error for dev and net. */
> > -	if (0)
> > +	case NETDEV_REGISTER:
> >  		ASSERT_RTNL_NET(net);
> > +		break;
> > +	}
> >  
> >  	return NOTIFY_DONE;
> >  }
> > ---8<---
> 
> FTR, the above fooled a bit both PW and our scripts: I had to manually
> mangle the cover letter into the merge commit. I guess it would be good
> to avoid patch snips in the cover-letter,

Oh sorry, noted.

Thank you !

      reply	other threads:[~2025-01-08  6:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04  8:21 [PATCH v1 net-next 0/2] dev: Hold per-netns RTNL in register_netdev() Kuniyuki Iwashima
2025-01-04  8:21 ` [PATCH v1 net-next 1/2] rtnetlink: Add rtnl_net_lock_killable() Kuniyuki Iwashima
2025-01-04  8:55   ` Eric Dumazet
2025-01-07 13:00   ` patchwork-bot+netdevbpf
2025-01-04  8:21 ` [PATCH v1 net-next 2/2] dev: Hold per-netns RTNL in (un)?register_netdev() Kuniyuki Iwashima
2025-01-04  8:56   ` Eric Dumazet
2025-01-07 12:55 ` [PATCH v1 net-next 0/2] dev: Hold per-netns RTNL in register_netdev() Paolo Abeni
2025-01-08  6:10   ` Kuniyuki Iwashima [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=20250108061050.9328-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.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).