summaryrefslogtreecommitdiffstats
path: root/drivers/hv/channel.c
diff options
context:
space:
mode:
authorLinus Torvalds2017-10-15 13:50:38 +0200
committerLinus Torvalds2017-10-15 13:50:38 +0200
commitae7df8f985f1b0445366ae6f6324cd08a218526e (patch)
tree7531517ec51cab79594fea13157f9a1a77d67d57 /drivers/hv/channel.c
parentMerge tag 'usb-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gre... (diff)
parentbinder: fix use-after-free in binder_transaction() (diff)
downloadkernel-qcow2-linux-ae7df8f985f1b0445366ae6f6324cd08a218526e.tar.gz
kernel-qcow2-linux-ae7df8f985f1b0445366ae6f6324cd08a218526e.tar.xz
kernel-qcow2-linux-ae7df8f985f1b0445366ae6f6324cd08a218526e.zip
Merge tag 'char-misc-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are 4 patches to resolve some char/misc driver issues found these past weeks. One of them is a mei bugfix and another is a new mei device id. There is also a hyper-v fix for a reported issue, and a binder issue fix for a problem reported by a few people. All of these have been in my tree for a while, I don't know if linux-next is really testing much this month. But 0-day is happy with them :)" * tag 'char-misc-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: fix use-after-free in binder_transaction() Drivers: hv: vmbus: Fix bugs in rescind handling mei: me: add gemini lake devices id mei: always use domain runtime pm callbacks.
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r--drivers/hv/channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index efd5db743319..894b67ac2cae 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -640,6 +640,7 @@ 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.
@@ -648,16 +649,15 @@ void vmbus_close(struct vmbus_channel *channel)
cur_channel = list_entry(cur, struct vmbus_channel, sc_list);
vmbus_close_internal(cur_channel);
if (cur_channel->rescind) {
- mutex_lock(&vmbus_connection.channel_mutex);
- hv_process_channel_removal(cur_channel,
+ hv_process_channel_removal(
cur_channel->offermsg.child_relid);
- mutex_unlock(&vmbus_connection.channel_mutex);
}
}
/*
* Now close the primary.
*/
vmbus_close_internal(channel);
+ mutex_unlock(&vmbus_connection.channel_mutex);
}
EXPORT_SYMBOL_GPL(vmbus_close);