From: Dexuan Cui <decui@microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>,
KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:Hyper-V/Azure CORE AND DRIVERS"
<linux-hyperv@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] Drivers: hv: kvp/vss: Avoid accessing a ringbuffer not initialized yet
Date: Fri, 1 Nov 2024 00:16:39 +0000 [thread overview]
Message-ID: <SA1PR21MB1317A021B6C5D552B38C4368BF562@SA1PR21MB1317.namprd21.prod.outlook.com> (raw)
In-Reply-To: <SN6PR02MB4157CDB89A61BA857E6FC0BFD4552@SN6PR02MB4157.namprd02.prod.outlook.com>
> From: Michael Kelley <mhklinux@outlook.com>
> Sent: Wednesday, October 30, 2024 5:12 PM
> [...]
> What do you think about this (compile tested only), which splits the
> "init" function into two parts for devices that have char devs? I'm
> trying to avoid adding yet another synchronization point by just
> doing the init operations in the right order -- i.e., don't create the
> user space /dev entry until the VMBus channel is ready.
>
> Michael
Thanks, I think this works! This is a better fix.
> + if (srv->util_init_transport) {
> + ret = srv->util_init_transport();
> + if (ret) {
> + ret = -ENODEV;
IMO we don't need the line above, since the 'ret' from
srv->util_init_transport() is already a standard error code.
BTW, I noticed that the line "ret = -ENODEV;"
if (srv->util_init) {
ret = srv->util_init(srv);
if (ret) {
ret = -ENODEV;
goto error1;
}
}
I think we don't really need that line, either.
The existing 4 .util_init callbacks also already return a
standard error code. We can make a separate patch to clean
that up.
Thanks,
Dexuan
next prev parent reply other threads:[~2024-11-01 0:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 16:47 Dexuan Cui
2024-10-29 7:02 ` [EXTERNAL] " Saurabh Singh Sengar
2024-10-29 23:44 ` Michael Kelley
2024-10-30 19:03 ` Dexuan Cui
2024-10-31 0:11 ` Michael Kelley
2024-11-01 0:16 ` Dexuan Cui [this message]
2024-11-01 1:38 ` Michael Kelley
2024-11-01 20:26 ` Dexuan Cui
2024-11-01 21:11 ` Michael Kelley
2024-11-01 21:25 ` Dexuan Cui
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=SA1PR21MB1317A021B6C5D552B38C4368BF562@SA1PR21MB1317.namprd21.prod.outlook.com \
--to=decui@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhklinux@outlook.com \
--cc=stable@vger.kernel.org \
--cc=vkuznets@redhat.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
all inboxes | Powered by JetHome®