netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Stanislav Fomichev <stfomichev@gmail.com>
Cc: Taehee Yoo <ap420073@gmail.com>,
	davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, horms@kernel.org, almasrymina@google.com,
	sdf@fomichev.me, netdev@vger.kernel.org, asml.silence@gmail.com,
	dw@davidwei.uk, skhawaja@google.com, willemb@google.com,
	jdamato@fastly.com
Subject: Re: [PATCH net v2] net: devmem: fix kernel panic when socket close after module unload
Date: Tue, 6 May 2025 19:42:33 -0700	[thread overview]
Message-ID: <20250506194233.281fa76d@kernel.org> (raw)
In-Reply-To: <aBpJ4GDED8cu4dKh@mini-arch>

On Tue, 6 May 2025 10:41:52 -0700 Stanislav Fomichev wrote:
> > +		mutex_unlock(&priv->lock);
> >  		netdev_unlock(dev);
> > +		netdev_put(dev, &dev_tracker);
> > +		mutex_lock(&priv->lock);  
> 
> nit: this feels like it deserves a comment on the lock ordering (and,
> hence, why this dance is needed). The rest looks good!

Agreed, and maybe document the ordering and what is protected 
in struct netdev_nl_sock ?

  reply	other threads:[~2025-05-07  2:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 14:08 [PATCH net v2] net: devmem: fix kernel panic when socket close after module unload Taehee Yoo
2025-05-06 17:41 ` Stanislav Fomichev
2025-05-07  2:42   ` Jakub Kicinski [this message]
2025-05-07  4:22   ` Taehee Yoo
2025-05-06 22:07 ` Jakub Kicinski
2025-05-07  4:24   ` Taehee Yoo
2025-05-07  2:55 ` Jakub Kicinski
2025-05-07  4:55   ` Taehee Yoo
2025-05-07 13:23     ` Jakub Kicinski
2025-05-07 15:54       ` Taehee Yoo
2025-05-07 13:08 ` kernel test robot
2025-05-07 18:28 ` Mina Almasry
2025-05-08  9:59   ` Taehee Yoo
2025-05-08 20:45     ` Mina Almasry

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=20250506194233.281fa76d@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=skhawaja@google.com \
    --cc=stfomichev@gmail.com \
    --cc=willemb@google.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).