From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: KY Srinivasan <kys@microsoft.com>
Cc: "devel\@linuxdriverproject.org" <devel@linuxdriverproject.org>,
Haiyang Zhang <haiyangz@microsoft.com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dexuan Cui <decui@microsoft.com>,
Jake Oshins <jakeo@microsoft.com>
Subject: Re: [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove
Date: Fri, 10 Apr 2015 14:47:57 +0200 [thread overview]
Message-ID: <87fv88up36.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <BY2PR0301MB0711E8D8C81EE6EF2DE848EAA0490@BY2PR0301MB0711.namprd03.prod.outlook.com> (KY Srinivasan's message of "Thu, 22 Jan 2015 19:08:29 +0000")
KY Srinivasan <kys@microsoft.com> writes:
>> -----Original Message-----
>> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>> Sent: Wednesday, January 21, 2015 11:02 AM
>> To: KY Srinivasan; devel@linuxdriverproject.org
>> Cc: Haiyang Zhang; linux-kernel@vger.kernel.org; Dexuan Cui
>> Subject: [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove
>>
>> In case we do request_resource() in vmbus_acpi_add() we need to tear it
>> down to be able to load the driver again. Otherwise the following crash in
>> oberved when hv_vmbus unload/load sequence is performed on
>> Generation2 instance:
>>
>> [ 38.165701] BUG: unable to handle kernel paging request at ffffffffa00075a0
>> [ 38.166315] IP: [<ffffffff8107dc5f>] __request_resource+0x2f/0x50
>> [ 38.166315] PGD 1f34067 PUD 1f35063 PMD 3f723067 PTE 0
>> [ 38.166315] Oops: 0000 [#1] SMP
>> [ 38.166315] Modules linked in: hv_vmbus(+) [last unloaded: hv_vmbus]
>> [ 38.166315] CPU: 0 PID: 267 Comm: modprobe Not tainted 3.19.0-
>> rc5_bug923184+ #486
>> [ 38.166315] Hardware name: Microsoft Corporation Virtual Machine/Virtual
>> Machine, BIOS Hyper-V UEFI Release v1.0 11/26/2012
>> [ 38.166315] task: ffff88003f401cb0 ti: ffff88003f60c000 task.ti:
>> ffff88003f60c000
>> [ 38.166315] RIP: 0010:[<ffffffff8107dc5f>] [<ffffffff8107dc5f>]
>> __request_resource+0x2f/0x50
>> [ 38.166315] RSP: 0018:ffff88003f60fb58 EFLAGS: 00010286
>> ...
>>
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>> ---
>> drivers/hv/vmbus_drv.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index
>> 4d6b269..b06cb87 100644
>> --- a/drivers/hv/vmbus_drv.c
>> +++ b/drivers/hv/vmbus_drv.c
>> @@ -902,6 +902,15 @@ acpi_walk_err:
>> return ret_val;
>> }
>>
>> +static int vmbus_acpi_remove(struct acpi_device *device) {
>> + int ret = 0;
>> +
>> + if (hyperv_mmio.start && hyperv_mmio.end)
>> + ret = release_resource(&hyperv_mmio);
>> + return ret;
>> +}
>> +
>> static const struct acpi_device_id vmbus_acpi_device_ids[] = {
>> {"VMBUS", 0},
>> {"VMBus", 0},
>> @@ -914,6 +923,7 @@ static struct acpi_driver vmbus_acpi_driver = {
>> .ids = vmbus_acpi_device_ids,
>> .ops = {
>> .add = vmbus_acpi_add,
>> + .remove = vmbus_acpi_remove,
>> },
>> };
>
> Vitaly,
>
> Jake has sent the following patch that has fixed retrieving of the mmio resources:
> https://lkml.org/lkml/2015/1/20/876
>
> This patch also deals with the resource cleanup that you have in this patch.
>
Hi K.Y.,
it looks like Jake was forced to redo his work, do you think it would
make sense to have this simple fix for mainline in the meantime? I can
rebase/resend in case you do.
Thanks,
--
Vitaly
next prev parent reply other threads:[~2015-04-10 12:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-21 19:02 [PATCH 0/3] Drivers: hv: vmbus: fix crashes on hv_vmbus load/unload path Vitaly Kuznetsov
2015-01-21 19:02 ` [PATCH 1/3] Drivers: hv: vmbus: avoid double kfree for device_obj Vitaly Kuznetsov
2015-01-21 19:02 ` [PATCH 2/3] Drivers: hv: vmbus: introduce vmbus_acpi_remove Vitaly Kuznetsov
2015-01-22 19:08 ` KY Srinivasan
2015-01-23 10:01 ` Vitaly Kuznetsov
2015-04-10 12:47 ` Vitaly Kuznetsov [this message]
2015-04-10 14:50 ` KY Srinivasan
2015-01-21 19:02 ` [PATCH 3/3] Drivers: hv: vmbus: teardown hv_vmbus_con workqueue and vmbus_connection pages on shutdown Vitaly Kuznetsov
2015-01-26 13:41 ` [PATCH 0/3] Drivers: hv: vmbus: fix crashes on hv_vmbus load/unload path Vitaly Kuznetsov
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=87fv88up36.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=decui@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=jakeo@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.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 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.