Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280061
b: refs/heads/master
c: 93e5bd0
h: refs/heads/master
i:
  280059: 83b8dca
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Dec 12, 2011
1 parent f921796 commit fd1bc92
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b8ee6753154dd6cfe397e0d29fe7f90a8adb50b
refs/heads/master: 93e5bd06a95343c701361fa009cdc5a653d6ec8e
11 changes: 11 additions & 0 deletions trunk/drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
vmbus_device_unregister(channel->device_obj);
}

void vmbus_free_channels(void)
{
struct vmbus_channel *channel;

list_for_each_entry(channel, &vmbus_connection.chn_list, listentry) {
vmbus_device_unregister(channel->device_obj);
kfree(channel->device_obj);
free_channel(channel);
}
}

/*
* vmbus_process_offer - Process the offer by creating a channel/device
* associated with this offer
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ void hv_cleanup(void)
{
union hv_x64_msr_hypercall_contents hypercall_msr;

/* Reset our OS id */
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);

kfree(hv_context.signal_event_buffer);
hv_context.signal_event_buffer = NULL;
hv_context.signal_event_param = NULL;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/hv/hyperv_vmbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ void vmbus_device_unregister(struct hv_device *device_obj);

struct vmbus_channel *relid2channel(u32 relid);

void vmbus_free_channels(void);

/* Connection interface */

Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,19 @@ static int __init hv_acpi_init(void)
return ret;
}

static void __exit vmbus_exit(void)
{

free_irq(irq, hv_acpi_dev);
vmbus_free_channels();
bus_unregister(&hv_bus);
hv_cleanup();
acpi_bus_unregister_driver(&vmbus_acpi_driver);
}


MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION);

subsys_initcall(hv_acpi_init);
module_exit(vmbus_exit);

0 comments on commit fd1bc92

Please sign in to comment.