aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2017-11-14 06:53:32 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-18 15:47:12 +0100
commit869b5567e12f63ea7407f81728ca87f8c0abbfdb (patch)
treebe534d33b4ab23a29e28aaaf1261c64c8822d618 /drivers/hv
parentthunderbolt: Mask ring interrupt properly when polling starts (diff)
downloadlinux-dev-869b5567e12f63ea7407f81728ca87f8c0abbfdb.tar.xz
linux-dev-869b5567e12f63ea7407f81728ca87f8c0abbfdb.zip
vmbus: unregister device_obj->channels_kset
Without the patch, a device can't be thoroughly destroyed, because vmbus_device_register() -> kset_create_and_add() still holds a reference to the hv_device's device.kobj. Signed-off-by: Dexuan Cui <decui@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info") Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/vmbus_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 76ed9a216f10..610223f0e945 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1378,6 +1378,8 @@ void vmbus_device_unregister(struct hv_device *device_obj)
pr_debug("child device %s unregistered\n",
dev_name(&device_obj->device));
+ kset_unregister(device_obj->channels_kset);
+
/*
* Kick off the process of unregistering the device.
* This will call vmbus_remove() and eventually vmbus_device_release()