Skip to content

Commit 869b556

Browse files
dcuigregkh
authored andcommitted
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: c2e5df6 ("vmbus: add per-channel sysfs info") Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7465718 commit 869b556

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hv/vmbus_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,8 @@ void vmbus_device_unregister(struct hv_device *device_obj)
13781378
pr_debug("child device %s unregistered\n",
13791379
dev_name(&device_obj->device));
13801380

1381+
kset_unregister(device_obj->channels_kset);
1382+
13811383
/*
13821384
* Kick off the process of unregistering the device.
13831385
* This will call vmbus_remove() and eventually vmbus_device_release()

0 commit comments

Comments
 (0)