Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
PATCH v2 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. In this version, I have added the Reported-by tag.
--- drivers/hv/channel.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hv/channel.c +2 -2
@@ -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
K. Y. Srinivasan,
Quoted 3 lines · K. Y. Srinivasan
Fix a bug in
vmbus_establish_gpadl(). I would like to thank Michael Brown <[email protected]> for seeing this bug. In this version, I have added the Reported-by tag.
The log message should be more specific. "Fix a bug" is too vague. Why is this patch necessary? What bug does it fix? What changes did you make?
Saying you have "added the Reported-by tag" is not helpful in a log message. Although you can add notes for the patch reviewer under '---'.
Quoted 2 lines
Signed-off-by K. Y. Srinivasan <[email protected]>Reported-by Michael Brown <[email protected]>
You followed Gregs advice [1], good :-)
[1]: https://lkml.org/lkml/2014/12/10/495
Quoted 1 line
---
I like to list the changes I make in patch revisions here:
Changes in V2:
Added Reported-by tag for Michael Brown <[email protected]>
Quoted 26 lines
drivers/hv/channel.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/hv/channel.c +2
-2@@ -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 · 7 lines
1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
- Jeremiah Mahler
Quoted 17 lines
-----Original Message-----
From: Jeremiah Mahler [mailto:[email protected]]
Sent: Wednesday, December 10, 2014 1:46 PM
To: KY Srinivasan
Cc: [email protected]; [email protected]
Subject: Re: [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug invmbus_establish_gpadl()K. Y. Srinivasan,
Quoted 3 lines · K. Y. Srinivasan
Fix a bug in
vmbus_establish_gpadl(). I would like to thank Michael Brown <[email protected]> for seeing this bug.
In this version, I have added the Reported-by tag.
Quoted 6 lines
The log message should be more specific. "Fix a bug" is too vague. Why is this patch necessary? What bug does it fix? What changes did you make?
Saying you have "added the Reported-by tag" is not helpful in a log message. Although you can add notes for the patch reviewer under '---'.
Thank you; I will fix up the log and resend.
K. Y