From: "jiale yao" <19888972804@163.com>
To: "Kameron Carr" <kameroncarr@linux.microsoft.com>
Cc: "Haiyang Zhang" <haiyangz@microsoft.com>,
"Wei Liu" <wei.liu@kernel.org>,
"Dexuan Cui" <decui@microsoft.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Stephen Hemminger" <stephen@networkplumber.org>,
linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re:Re: [PATCH v2 2/2] Drivers: hv: vmbus: copy dynamic IDs before dropping the lock
Date: Tue, 27 Oct 2026 14:59:19 +0800 (CST) [thread overview]
Message-ID: <768c8007.587f.1a17c2801ce.Coremail.19888972804@163.com> (raw)
In-Reply-To: <d04125b1-1228-4322-a455-3b8970167239@linux.microsoft.com>
At 2026-10-24 08:41:17, "Kameron Carr" <kameroncarr@linux.microsoft.com> wrote:
>On 10/21/2026 7:33 AM, Jiale Yao wrote:
>[...]
>> @@ -860,13 +862,17 @@ static int vmbus_match(struct device *device, const struct device_driver *driver
>> */
>> static int vmbus_probe(struct device *child_device)
>> {
>> - int ret = 0;
>> + const struct hv_vmbus_device_id *dev_id;
>> + struct hv_vmbus_device_id dev_id_copy;
>> struct hv_driver *drv =
>> drv_to_hv_drv(child_device->driver);
>> struct hv_device *dev = device_to_hv_device(child_device);
>> - const struct hv_vmbus_device_id *dev_id;
>> + int ret = 0;
>
>Nit: the reordering of these declarations is unnecessary.
>In a stable patch, we shouldn't include any purely style changes.
>
>--
>Regards,
>Kameron
>
>> +
>> + dev_id = hv_vmbus_get_id(drv, dev, &dev_id_copy);
>> + if (!dev_id && !is_hvsock_channel(dev->channel))
>> + return -ENODEV;
>>
>> - dev_id = hv_vmbus_get_id(drv, dev);
>> if (drv->probe) {
>> ret = drv->probe(dev, dev_id);
>> if (ret != 0)
>> diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
>> index 9e109d91aa14..0f0423e8a184 100644
>> --- a/include/linux/hyperv.h
>> +++ b/include/linux/hyperv.h
>> @@ -1264,6 +1264,7 @@ struct hv_driver {
>> struct list_head list;
>> } dynids;
>>
>> + /* The device ID pointer is only valid during the probe callback. */
>> int (*probe)(struct hv_device *, const struct hv_vmbus_device_id *);
>> void (*remove)(struct hv_device *dev);
>> void (*shutdown)(struct hv_device *);
>
>
Thanks for your review, the updated one is here, https://lore.kernel.org/all/20261027065642.2280297-1-yaojiale02@163.com/
next prev parent reply other threads:[~2026-10-27 6:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 14:33 [PATCH v2 0/2] Drivers: hv: vmbus: fix dynamic ID races Jiale Yao
2026-10-21 14:33 ` [PATCH v2 1/2] Drivers: hv: vmbus: prevent duplicate dynamic IDs Jiale Yao
2026-10-21 14:33 ` [PATCH v2 2/2] Drivers: hv: vmbus: copy dynamic IDs before dropping the lock Jiale Yao
2026-10-24 0:41 ` Kameron Carr
2026-10-27 6:59 ` jiale yao [this message]
2026-10-24 0:42 ` [PATCH v2 0/2] Drivers: hv: vmbus: fix dynamic ID races Kameron Carr
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=768c8007.587f.1a17c2801ce.Coremail.19888972804@163.com \
--to=19888972804@163.com \
--cc=decui@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kameroncarr@linux.microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stephen@networkplumber.org \
--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
all inboxes | Powered by JetHome®