Drivers: hv: kvp: reset kvp_context
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sun, 12 Apr 2015 01:07:40 +0000 (18:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 May 2015 19:17:40 +0000 (12:17 -0700)
We set kvp_context when we want to postpone receiving a packet from vmbus due
to the previous transaction being unfinished. We, however, never reset this
state, all consequent kvp_respond_to_host() calls will result in poll_channel()
calling hv_kvp_onchannelcallback(). This doesn't cause real issues as:
1) Host is supposed to serialize transactions as well
2) If no message is pending vmbus_recvpacket() will return 0 recvlen.
This is just a cleanup.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Tested-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_kvp.c

index a414c8397f8840902a87581d080887a6aa6e0cba..caa467dc835141dfa3d6af43217fc6f4fec90a92 100644 (file)
@@ -621,6 +621,7 @@ void hv_kvp_onchannelcallback(void *context)
                kvp_transaction.kvp_context = context;
                return;
        }
+       kvp_transaction.kvp_context = NULL;
 
        vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen,
                         &requestid);
This page took 0.026183 seconds and 5 git commands to generate.