[azure][PATCH 01/14] UBUNTU: SAUCE: vmbus: vmbus_open(): reset onchannel_callback on error

Marcelo Henrique Cerri marcelo.cerri at canonical.com
Tue Jun 20 17:27:21 UTC 2017


From: Dexuan Cui <decui at microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1698425

No real issue is observed without the patch, but let's add this
just in case.

Signed-off-by: Dexuan Cui <decui at microsoft.com>
Cc: K. Y. Srinivasan <kys at microsoft.com>
Cc: Haiyang Zhang <haiyangz at microsoft.com>
Cc: Stephen Hemminger <sthemmin at microsoft.com>
Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
---
 drivers/hv/channel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 736ac76d2a6a..5f91e6b8eb01 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -220,6 +220,8 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
 		     get_order(send_ringbuffer_size + recv_ringbuffer_size));
 error_set_chnstate:
 	newchannel->state = CHANNEL_OPEN_STATE;
+	newchannel->onchannel_callback = NULL;
+	newchannel->channel_callback_context = NULL;
 	return err;
 }
 EXPORT_SYMBOL_GPL(vmbus_open);
-- 
2.7.4





More information about the kernel-team mailing list