From: Jakub Kicinski <kuba@kernel.org>
To: Gaurav Kohli <gauravkohli@linux.microsoft.com>
Cc: kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
linux-hyperv@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net] hv_netvsc: Fix race between VF offering and VF association message from host
Date: Thu, 29 Sep 2022 19:26:20 -0700 [thread overview]
Message-ID: <20220929192620.2fa1542f@kernel.org> (raw)
In-Reply-To: <1664372913-26140-1-git-send-email-gauravkohli@linux.microsoft.com>
On Wed, 28 Sep 2022 06:48:33 -0700 Gaurav Kohli wrote:
> During vm boot, there might be possibility that vf registration
> call comes before the vf association from host to vm.
>
> And this might break netvsc vf path, To prevent the same block
> vf registration until vf bind message comes from host.
>
> Cc: stable@vger.kernel.org
> Fixes: 00d7ddba11436 ("hv_netvsc: pair VF based on serial number")
> Signed-off-by: Gaurav Kohli <gauravkohli@linux.microsoft.com>
Is it possible to add a timeout or such? Waiting for an external
event while holding rtnl lock seems a little scary.
The other question is - what protects the completion and ->vf_alloc
from races? Is there some locking? ->vf_alloc only goes from 0 to 1
and never back?
next prev parent reply other threads:[~2022-09-30 2:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 13:48 [PATCH net] hv_netvsc: Fix race between VF offering and VF association message from host Gaurav Kohli
2022-09-29 20:39 ` Haiyang Zhang
2022-09-30 2:26 ` Jakub Kicinski [this message]
2022-09-30 13:03 ` Haiyang Zhang
2022-10-06 4:13 ` Gaurav Kohli
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=20220929192620.2fa1542f@kernel.org \
--to=kuba@kernel.org \
--cc=decui@microsoft.com \
--cc=gauravkohli@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sthemmin@microsoft.com \
--cc=wei.liu@kernel.org \
/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).