aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2015-01-10 02:54:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 12:17:58 -0500
commit9f52a1630922bcdab75fc72e59ed58db8e164314 (patch)
treed85a3decae84b9b5d36b606a5e38316730490fc3 /drivers/hv
parent4061ed9e2aaac31daef44f06e9b83143c78b24b2 (diff)
Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
Correctly compute the local (gpadl) handle. I would like to thank Michael Brown <mcb30@ipxe.org> for seeing this bug. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reported-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 433f72a1c006..c76ffbe59f65 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -366,8 +366,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
366 unsigned long flags; 366 unsigned long flags;
367 int ret = 0; 367 int ret = 0;
368 368
369 next_gpadl_handle = atomic_read(&vmbus_connection.next_gpadl_handle); 369 next_gpadl_handle =
370 atomic_inc(&vmbus_connection.next_gpadl_handle); 370 (atomic_inc_return(&vmbus_connection.next_gpadl_handle) - 1);
371 371
372 ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount); 372 ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
373 if (ret) 373 if (ret)