]> git.baikalelectronics.ru Git - kernel.git/commit
xen/netfront: fix waiting for xenbus state change
authorJuergen Gross <jgross@suse.com>
Fri, 7 Sep 2018 12:21:30 +0000 (14:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Sep 2018 06:03:16 +0000 (23:03 -0700)
commit0dd9531c7cd6f9a74762870247eee8bd48c94f9b
tree88181129adcf862a3aeb5f2d5d1e5b4770083fbc
parent31b1737b7b5619cfcc09fff963a29af4670da50b
xen/netfront: fix waiting for xenbus state change

Commit 0f6ad48e713a7 ("xen-netfront: wait xenbus state change when load
module manually") added a new wait queue to wait on for a state change
when the module is loaded manually. Unfortunately there is no wakeup
anywhere to stop that waiting.

Instead of introducing a new wait queue rename the existing
module_unload_q to module_wq and use it for both purposes (loading and
unloading).

As any state change of the backend might be intended to stop waiting
do the wake_up_all() in any case when netback_changed() is called.

Fixes: 0f6ad48e713a7 ("xen-netfront: wait xenbus state change when load module manually")
Cc: <stable@vger.kernel.org> #4.18
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c