From: kys@exchange.microsoft.com
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
vkuznets@redhat.com, jasowang@redhat.com,
leann.ogasawara@canonical.com, marcelo.cerri@canonical.com,
sthemmin@microsoft.com
Cc: Dexuan Cui <decui@microsoft.com>,
stable@vger.kernel.org, "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 1/2] vmbus: unregister device_obj->channels_kset
Date: Tue, 14 Nov 2017 06:53:32 -0700 [thread overview]
Message-ID: <1510667613-3035-1-git-send-email-kys@exchange.microsoft.com> (raw)
In-Reply-To: <1510667553-2991-1-git-send-email-kys@exchange.microsoft.com>
From: Dexuan Cui <decui@microsoft.com>
Fixes: c2e5df616e1a ("vmbus: add per-channel sysfs info")
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>
Cc: stable@vger.kernel.org
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/hv/vmbus_drv.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 6a86746..4f3faf5 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()
--
1.7.1
next prev parent reply other threads:[~2017-11-14 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 13:52 [PATCH 0/2] Drivers: hv: vmbus: Miscellaneous fixes kys
2017-11-14 13:53 ` kys [this message]
2017-11-28 15:56 ` [PATCH 1/2] vmbus: unregister device_obj->channels_kset Greg KH
2017-11-28 17:29 ` Stephen Hemminger
2017-12-11 20:41 ` Dexuan Cui
2017-12-11 20:58 ` Greg KH
2017-12-11 21:02 ` Dexuan Cui
2017-11-14 13:53 ` [PATCH 2/2] Drivers: hv: vmbus: Fix a rescind issue kys
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=1510667613-3035-1-git-send-email-kys@exchange.microsoft.com \
--to=kys@exchange.microsoft.com \
--cc=apw@canonical.com \
--cc=decui@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=leann.ogasawara@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=olaf@aepfle.de \
--cc=stable@vger.kernel.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®