mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-25 10:59:05 +00:00
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>
This commit is contained in:
parent
4061ed9e2a
commit
9f52a16309
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user