From: Vitaly Kuznetsov Date: Sun, 12 Apr 2015 01:07:40 +0000 (-0700) Subject: Drivers: hv: kvp: reset kvp_context X-Git-Tag: v4.1.12-92~196^2~83 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=de4dcb3b9ecd8f69e9865f03c65c245c4cdc3913;p=users%2Fjedix%2Flinux-maple.git Drivers: hv: kvp: reset kvp_context 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 Tested-by: Alex Ng Signed-off-by: K. Y. Srinivasan Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 5fa97480b9b125bb9bdb446930289b3274ed7eb7) Orabug: 21886720 Signed-off-by: Jason Luo --- diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c index beb8105c0e7ba..2152872d9e350 100644 --- a/drivers/hv/hv_kvp.c +++ b/drivers/hv/hv_kvp.c @@ -620,6 +620,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);