]> git.baikalelectronics.ru Git - kernel.git/commit
uio_hv_generic: defer opening vmbus until first use
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 14 Sep 2018 16:10:20 +0000 (09:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:33:24 +0000 (20:33 +0200)
commit5cf029164764185d6896042c208f25c10c995166
treeb7ae393e6ef9425d64975cc117a4727d75dc4425
parente4580f9b561092989a1e2284b073d3b4949689a5
uio_hv_generic: defer opening vmbus until first use

This fixes two design flaws in hv_uio_generic.

Since hv_uio_probe is called from vmbus_probe with lock held
it potentially can cause sleep in an atomic section because
vmbus_open will wait for response from host.

The hv_uio_generic driver could not handle applications
exiting and restarting because the vmbus channel was
persistent.  Change the semantics so that the buffers are
allocated on probe, but not attached to host until
device is opened.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_hv_generic.c