Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589120
| From | Dexuan Cui <decui@microsoft.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't |
| Date | 2017-02-28 03:40 +0100 |
| Message-ID | <tfFRL-6hE-19@gated-at.bofh.it> (permalink) |
| References | <tfrF7-4Ql-27@gated-at.bofh.it> <tfx7P-gn-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> From: Stephen Hemminger
> Sent: Tuesday, February 28, 2017 01:02
>
> The patch looks good. I don't understand the exact semantics here and
> therefore have a couple of naïve questions
>
> Is it possible device could be opened multiple times? Is reference counting
> done above?
The file can only be opened once.
When we open it for the first time, in hvt_op_open() we run
hvt->mode = HVUTIL_TRANSPORT_CHARDEV, and when we try to open it later,
the open() gets -EBUSY.
When the first fd is closed, in hvt_op_release() we run
hvt->mode = HVUTIL_TRANSPORT_INIT, so we can re-open it successfully later.
> If device was never opened do you even have to do all the cleanup steps at
> all?
Yes, e.g. we do need the 3 cancel_*work_sync calls in hv_kvp_deinit():
the driver schedules the 3 works even if there is no daemon at all, e.g.
hv_kvp_onchannelcallback ->
schedule_delayed_work(&kvp_host_handshake_work, ...).
Thanks,
-- Dexuan
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Dexuan Cui <decui@microsoft.com> - 2017-02-27 12:30 +0100
RE: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Stephen Hemminger <sthemmin@microsoft.com> - 2017-02-27 18:20 +0100
RE: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Dexuan Cui <decui@microsoft.com> - 2017-02-28 03:40 +0100
RE: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Dexuan Cui <decui@microsoft.com> - 2017-02-28 13:50 +0100
RE: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Dexuan Cui <decui@microsoft.com> - 2017-02-28 14:20 +0100
Re: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-28 14:20 +0100
Re: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-28 15:30 +0100
Re: [PATCH] Drivers: hv: util: on deinit, don't wait the release event, if we shouldn't Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-02-28 14:00 +0100
csiph-web