* [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
@ 2014-12-10 20:29 K. Y. Srinivasan
2014-12-10 21:45 ` Jeremiah Mahler
0 siblings, 1 reply; 3+ messages in thread
From: K. Y. Srinivasan @ 2014-12-10 20:29 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang, mcb30; +Cc: K. Y. Srinivasan
Fix a bug in vmbus_establish_gpadl(). I would like to
thank Michael Brown <mcb30@ipxe.org> for seeing this bug.
In this version, I have added the Reported-by tag.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reported-by: Michael Brown <mcb30@ipxe.org>
---
drivers/hv/channel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 433f72a..c76ffbe 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,
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)
--
1.7.4.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
2014-12-10 20:29 [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl() K. Y. Srinivasan
@ 2014-12-10 21:45 ` Jeremiah Mahler
2014-12-11 0:02 ` KY Srinivasan
0 siblings, 1 reply; 3+ messages in thread
From: Jeremiah Mahler @ 2014-12-10 21:45 UTC (permalink / raw)
To: K. Y. Srinivasan; +Cc: gregkh, linux-kernel
K. Y. Srinivasan,
On Wed, Dec 10, 2014 at 12:29:19PM -0800, K. Y. Srinivasan wrote:
> Fix a bug in vmbus_establish_gpadl(). I would like to
> thank Michael Brown <mcb30@ipxe.org> 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 '---'.
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Reported-by: Michael Brown <mcb30@ipxe.org>
You followed Gregs advice [1], good :-)
[1]: https://lkml.org/lkml/2014/12/10/495
> ---
I like to list the changes I make in patch revisions here:
Changes in V2:
Added Reported-by tag for Michael Brown <mcb30@ipxe.org>
> drivers/hv/channel.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
> index 433f72a..c76ffbe 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,
> 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)
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
- Jeremiah Mahler
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
2014-12-10 21:45 ` Jeremiah Mahler
@ 2014-12-11 0:02 ` KY Srinivasan
0 siblings, 0 replies; 3+ messages in thread
From: KY Srinivasan @ 2014-12-11 0:02 UTC (permalink / raw)
To: Jeremiah Mahler; +Cc: gregkh, linux-kernel
> -----Original Message-----
> From: Jeremiah Mahler [mailto:jmmahler@gmail.com]
> Sent: Wednesday, December 10, 2014 1:46 PM
> To: KY Srinivasan
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in
> vmbus_establish_gpadl()
>
> K. Y. Srinivasan,
>
> On Wed, Dec 10, 2014 at 12:29:19PM -0800, K. Y. Srinivasan wrote:
> > Fix a bug in vmbus_establish_gpadl(). I would like to thank Michael
> > Brown <mcb30@ipxe.org> 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 '---'.
Thank you; I will fix up the log and resend.
K. Y
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-11 0:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10 20:29 [PATCH V2 1/1] Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl() K. Y. Srinivasan
2014-12-10 21:45 ` Jeremiah Mahler
2014-12-11 0:02 ` KY Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome