projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4061ed9
)
Drivers: hv: vmbus: Fix a bug in vmbus_establish_gpadl()
author
K. Y. Srinivasan
<
[email protected]
>
Sat, 10 Jan 2015 07:54:33 +0000
(23:54 -0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Sun, 25 Jan 2015 17:17:58 +0000
(09:17 -0800)
Correctly compute the local (gpadl) handle.
I would like to thank Michael Brown <
[email protected]
> for seeing this bug.
Signed-off-by: K. Y. Srinivasan <
[email protected]
>
Reported-by: Michael Brown <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/hv/channel.c
patch
|
blob
|
history
diff --git
a/drivers/hv/channel.c
b/drivers/hv/channel.c
index 433f72a1c0062be9b13dff78b6885d37a80a8738..c76ffbe59f65539597f5ba0cb5b50265ef2f3b7d 100644
(file)
--- 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)