Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Taehee Yoo <ap420073@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, gnault@redhat.com
Subject: Re: [PATCH net v2] Revert "netns: don't disable BHs when locking "nsid_lock""
Date: Mon, 7 Sep 2020 14:37:24 -0700 [thread overview]
Message-ID: <20200907143724.6564fd4b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20200907155441.5938-1-ap420073@gmail.com>
On Mon, 7 Sep 2020 15:54:41 +0000 Taehee Yoo wrote:
> This reverts commit 8d7e5dee972f1cde2ba96c621f1541fa36e7d4f4.
>
> To protect netns id, the nsid_lock is used when netns id is being
> allocated and removed by peernet2id_alloc() and unhash_nsid().
> The nsid_lock can be used in BH context but only spin_lock() is used
> in this code.
> Using spin_lock() instead of spin_lock_bh() can result in a deadlock in
> the following scenario reported by the lockdep.
> In order to avoid a deadlock, the spin_lock_bh() should be used instead
> of spin_lock() to acquire nsid_lock.
Applied, thank you!
prev parent reply other threads:[~2020-09-07 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 15:54 Taehee Yoo
2020-09-07 21:37 ` Jakub Kicinski [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=20200907143724.6564fd4b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=ap420073@gmail.com \
--cc=davem@davemloft.net \
--cc=gnault@redhat.com \
--cc=netdev@vger.kernel.org \
--subject='Re: [PATCH net v2] Revert "netns: don'\''t disable BHs when locking "nsid_lock""' \
/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
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).