]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: hv: util: Fix a bug in kvp implementation
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 4 Oct 2011 21:00:02 +0000 (14:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 11 Oct 2011 00:05:27 +0000 (17:05 -0700)
commiteb5df2b1c9e80939b415410c1916f5b68b6b5207
tree1159513b1b822081bcd5333745e6b2e96061007c
parente5888cddf50e2ebe51cd51816dee1f111d29e67e
Staging: hv: util: Fix a bug in kvp implementation

The host gurantees that there can be only one kvp transaction active
against the guest. So, the transaction active state is needed only to
protect against spurious user level calls. The current code had a race
condition where the guest could prematurely return because the previous
transaction state was not cleared - this state was being cleared after
sending the response to the host and there was a window where the host
could notify the guest of a new transaction before the transaction active
state was properly set.
Also deal with the case when the user mode component
does not respond in a timely fashion correctly.
I would like to thank Long Li <longli@microsoft.com>
for identifying the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Diagnosed-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hv_kvp.c