* Patch "Drivers: hv: vmbus: Fix a bug in the error path in vmbus_open()" has been added to the 4.0-stable tree
@ 2015-05-02 17:17 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 17:17 UTC (permalink / raw)
To: kys, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
Drivers: hv: vmbus: Fix a bug in the error path in vmbus_open()
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drivers-hv-vmbus-fix-a-bug-in-the-error-path-in-vmbus_open.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 40384e4bbeb9f2651fe9bffc0062d9f31ef625bf Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Fri, 27 Feb 2015 11:26:04 -0800
Subject: Drivers: hv: vmbus: Fix a bug in the error path in vmbus_open()
From: "K. Y. Srinivasan" <kys@microsoft.com>
commit 40384e4bbeb9f2651fe9bffc0062d9f31ef625bf upstream.
Correctly rollback state if the failure occurs after we have handed over
the ownership of the buffer to the host.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hv/channel.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -135,7 +135,7 @@ int vmbus_open(struct vmbus_channel *new
GFP_KERNEL);
if (!open_info) {
err = -ENOMEM;
- goto error0;
+ goto error_gpadl;
}
init_completion(&open_info->waitevent);
@@ -151,7 +151,7 @@ int vmbus_open(struct vmbus_channel *new
if (userdatalen > MAX_USER_DEFINED_BYTES) {
err = -EINVAL;
- goto error0;
+ goto error_gpadl;
}
if (userdatalen)
@@ -195,6 +195,9 @@ error1:
list_del(&open_info->msglistentry);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+error_gpadl:
+ vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle);
+
error0:
free_pages((unsigned long)out,
get_order(send_ringbuffer_size + recv_ringbuffer_size));
Patches currently in stable-queue which might be from kys@microsoft.com are
queue-4.0/drivers-hv-vmbus-fix-a-bug-in-the-error-path-in-vmbus_open.patch
queue-4.0/scsi-storvsc-fix-a-bug-in-copy_from_bounce_buffer.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-02 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 17:17 Patch "Drivers: hv: vmbus: Fix a bug in the error path in vmbus_open()" has been added to the 4.0-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).