Skip to contentSkip to conversation

Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()

PATCH Superseded K. Y. Srinivasan 2 participants 3 messages Dec 10, 2014 Hyper-V/Azure core and drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()

Fix a bug in vmbus_establish_gpadl(). I would like to thank Michael Brown <[email protected]> for seeing this bug.

---
 drivers/hv/channel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hv/channel.c +2 -2
index 433f72a..c76ffbe 100644
@@ -366,8 +366,8 @@ int vmbus_establish_gpadl(struct vmbus_channel *channel, void *kbuffer,
 	unsigned long flags;
 	int ret = 0;
 
-	next_gpadl_handle = atomic_read(&vmbus_connection.next_gpadl_handle);
-	atomic_inc(&vmbus_connection.next_gpadl_handle);
+	next_gpadl_handle =
+		(atomic_inc_return(&vmbus_connection.next_gpadl_handle) - 1);
 
 	ret = create_gpadl_header(kbuffer, size, &msginfo, &msgcount);
 	if (ret)
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 2 lines · K. Y. Srinivasan

Fix a bug in vmbus_establish_gpadl(). I would like to thank Michael Brown <[email protected]> for seeing this bug.

Then use the "Reported-by:" tag with his name in this patch please.

thanks,

greg k-h

#2 lore raw
Quoted 12 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, December 10, 2014 11:00 AM
To: KY Srinivasan
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()

Quoted 5 lines
Quoted 2 lines · K. Y. Srinivasan

Fix a bug in vmbus_establish_gpadl(). I would like to thank Michael Brown <[email protected]> for seeing this bug.

Then use the "Reported-by:" tag with his name in this patch please.

Will do. I will resend it.

Quoted 4 lines

thanks,

greg k-h