From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: KY Srinivasan <kys@microsoft.com>
Cc: "gregkh\@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devel\@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"olaf\@aepfle.de" <olaf@aepfle.de>,
"apw\@canonical.com" <apw@canonical.com>,
"jasowang\@redhat.com" <jasowang@redhat.com>
Subject: Re: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state
Date: Mon, 20 Apr 2015 16:17:11 +0200 [thread overview]
Message-ID: <87vbgqc2ag.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <BY2PR0301MB07110FC7C0F17574D6641AE5A0E00@BY2PR0301MB0711.namprd03.prod.outlook.com> (KY Srinivasan's message of "Mon, 20 Apr 2015 14:12:13 +0000")
KY Srinivasan <kys@microsoft.com> writes:
>> -----Original Message-----
>> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>> Sent: Monday, April 20, 2015 2:40 AM
>> To: KY Srinivasan
>> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
>> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
>> jasowang@redhat.com
>> Subject: Re: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for
>> tearing down vmbus state
>>
>> "K. Y. Srinivasan" <kys@microsoft.com> writes:
>>
>> > Implement the protocol for tearing down the monitor state established
>> with
>> > the host.
>> >
>> > Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
>>
>> Unfortunatelly this patch leads to the following crash:
>
> Thanks for testing Vitaly. The unload handling is what we want, maybe I need to
> Invoke unload a little earlier.
I actually sent two letters this morning :-) The other was:
The problem is that we call vmbus_disconnect() too late in
vmbus_exit(). We need to call it:
1) Before hv_cleanup() call as we free hypercall page there (that's what
you see in my crash)
2) Before hv_remove_vmbus_irq() as we're waiting for the hypervisor to
reply.
This simple patch fixes the issue:
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 7870a90..2b56260 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1106,6 +1106,7 @@ static void __exit vmbus_exit(void)
vmbus_connection.conn_state = DISCONNECTED;
hv_synic_clockevents_cleanup();
+ vmbus_disconnect();
hv_remove_vmbus_irq();
vmbus_free_channels();
if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
@@ -1118,7 +1119,6 @@ static void __exit vmbus_exit(void)
smp_call_function_single(cpu, hv_synic_cleanup, NULL,
1);
acpi_bus_unregister_driver(&vmbus_acpi_driver);
hv_cpu_hotplug_quirk(false);
- vmbus_disconnect();
}
I suggest we incorporate it into your PATCH 5/5.
--
Vitaly
next prev parent reply other threads:[~2015-04-20 14:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 7:44 [PATCH 0/5] Drivers: hv: vmbus: Cleanup the vmbus unload path K. Y. Srinivasan
2015-04-20 7:45 ` [PATCH 1/5] Drivers: hv: vmbus: introduce vmbus_acpi_remove K. Y. Srinivasan
2015-04-20 7:45 ` [PATCH 2/5] Drivers: hv: vmbus: unregister panic notifier on module unload K. Y. Srinivasan
2015-04-20 7:45 ` [PATCH 3/5] hv: vmbus_free_channels(): remove the redundant free_channel() K. Y. Srinivasan
2015-04-20 7:45 ` [PATCH 4/5] drivers: hv: vmbus: Get rid of some unused definitions K. Y. Srinivasan
2015-04-20 7:45 ` [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state K. Y. Srinivasan
2015-04-20 9:39 ` Vitaly Kuznetsov
2015-04-20 10:28 ` Vitaly Kuznetsov
2015-04-20 14:12 ` KY Srinivasan
2015-04-20 14:17 ` Vitaly Kuznetsov [this message]
2015-04-20 14:32 ` KY Srinivasan
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=87vbgqc2ag.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.