diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-10 04:09:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-10 04:09:55 +0100 |
commit | 51e18a453f5f59a40c721d4aeab082b4e2e9fac6 (patch) | |
tree | 540d37e6f7a83466677ab6095fcdd2d6f72583c4 /drivers/hv/channel.c | |
parent | macvlan: fix memory hole in macvlan_dev (diff) | |
parent | kmemcheck: rip it out for real (diff) | |
download | linux-51e18a453f5f59a40c721d4aeab082b4e2e9fac6.tar.xz linux-51e18a453f5f59a40c721d4aeab082b4e2e9fac6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflict was two parallel additions of include files to sch_generic.c,
no biggie.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r-- | drivers/hv/channel.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 19f0cf37e0ed..ba0a092ae085 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -659,22 +659,28 @@ void vmbus_close(struct vmbus_channel *channel) */ return; } - mutex_lock(&vmbus_connection.channel_mutex); /* * Close all the sub-channels first and then close the * primary channel. */ list_for_each_safe(cur, tmp, &channel->sc_list) { cur_channel = list_entry(cur, struct vmbus_channel, sc_list); - vmbus_close_internal(cur_channel); if (cur_channel->rescind) { + wait_for_completion(&cur_channel->rescind_event); + mutex_lock(&vmbus_connection.channel_mutex); + vmbus_close_internal(cur_channel); hv_process_channel_removal( cur_channel->offermsg.child_relid); + } else { + mutex_lock(&vmbus_connection.channel_mutex); + vmbus_close_internal(cur_channel); } + mutex_unlock(&vmbus_connection.channel_mutex); } /* * Now close the primary. */ + mutex_lock(&vmbus_connection.channel_mutex); vmbus_close_internal(channel); mutex_unlock(&vmbus_connection.channel_mutex); } |