From: Simon Horman <horms@kernel.org>
To: Manoj Vishwanathan <manojvishy@google.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>,
netdev@vger.kernel.org, David Decotigny <decot@google.com>,
linux-kernel@vger.kernel.org,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH] [PATCH iwl-net] idpf: Acquire the lock before accessing the xn->salt
Date: Wed, 7 Aug 2024 18:05:42 +0100 [thread overview]
Message-ID: <20240807170542.GE3006561@kernel.org> (raw)
In-Reply-To: <CA+M8utN7FbwMF5QN8O0a0Qnd3ykQwq7O4QkHMVEaBj2jE9BEYw@mail.gmail.com>
On Wed, Aug 07, 2024 at 06:58:59AM -0700, Manoj Vishwanathan wrote:
> Thanks Przemek & Olek for your quick feedback and responses.
> Hi Olek,
> I can add more details about the issue we faced in the commit message.
> The bug we had here was a virtchnl delay leading to the xn->salt
> mismatch. This could be due to several factors including default CPU
> bounded kworker workqueue for virtchnl message processing being
> starved by aggressive userspace load causing the virtchnl to be
> delayed. While debugging this issue, this locking order appeared like
> a potential issue, hence the change was made.
> But, this change is more a clean up we felt based on concurrent access
> to the virtchnl transaction struct and does not fix the issue. This is
> more of the patch to do the right thing before we access the "xn".
> I wanted to start with a first patch to the community for acceptance
> followed by a series of other patches that are general clean up or
> improvements to IDPF in general. Will follow with with [PATCH v3]
Still, I am a little confused about the protection offered to xn->salt.
My analysis is as follows, where guarded is used loosely to mean
the lock is held.
* In idpf_vc_xn_pop_free() it is guarded by vcxn_mngr->xn_bm_lock.
* In idpf_vc_xn_exec() it is guarded by:
1. vcxn_mngr->xn_bm_lock when idpf_vc_xn_pop_free is called
2. idpf_vc_xn_lock, otherwise
* And with this patch, in idpf_vc_xn_forward_reply it is guarded
by idpf_vc_xn_lock().
This doesn't seem entirely consistent.
Also, please don't top-post on Kernel mailing lists.
...
prev parent reply other threads:[~2024-08-07 17:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-03 18:25 [PATCH] idpf: Acquire the lock before accessing the xn->salt Manoj Vishwanathan
2024-08-05 13:37 ` Przemek Kitszel
2024-08-05 18:21 ` [PATCH] [PATCH iwl-net] " Manoj Vishwanathan
2024-08-06 10:23 ` Przemek Kitszel
2024-08-07 11:04 ` [Intel-wired-lan] " Alexander Lobakin
2024-08-07 13:58 ` Manoj Vishwanathan
2024-08-07 14:04 ` Alexander Lobakin
2024-08-07 17:05 ` Simon Horman [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=20240807170542.GE3006561@kernel.org \
--to=horms@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manojvishy@google.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.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).