Blob Blame History Raw
Subject: hv: print extra debug in kvp_on_msg in error paths
From: <ohering@suse.de>
Patch-mainline: Never, this change is just for diagnostic
References: bnc#1039153

--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -154,6 +154,7 @@ static void kvp_timeout_func(struct work
 	 */
 	kvp_respond_to_host(NULL, HV_E_FAIL);
 
+	pr_info("KVP: timeout after %d seconds\n", HV_UTIL_TIMEOUT);
 	hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper);
 }
 
@@ -202,7 +203,14 @@ static int kvp_on_msg(void *msg, int len
 	int	error = 0;
 
 	if (len < sizeof(*message))
+	{
+		static int i = 0;
+		if (!i) {
+			i = 1;
+			pr_err("bug#1039153 %s(%u) %s[%u], len %d msg %d state %d\n", __func__, __LINE__, current->comm, current->pid, len, (int)sizeof(*message), kvp_transaction.state);
+		}
 		return -EINVAL;
+	}
 
 	/*
 	 * If we are negotiating the version information
@@ -215,7 +223,14 @@ static int kvp_on_msg(void *msg, int len
 
 	/* We didn't send anything to userspace so the reply is spurious */
 	if (kvp_transaction.state < HVUTIL_USERSPACE_REQ)
+	{
+		static int i = 0;
+		if (!i) {
+			i = 1;
+			pr_err("bug#1039153 %s(%u) %s[%u], state %d < %d\n", __func__, __LINE__, current->comm, current->pid, kvp_transaction.state, HVUTIL_USERSPACE_REQ);
+		}
 		return -EINVAL;
+	}
 
 	kvp_transaction.state = HVUTIL_USERSPACE_RECV;
 
--- a/drivers/hv/hv_fcopy.c
+++ b/drivers/hv/hv_fcopy.c
@@ -90,6 +90,7 @@ static void fcopy_timeout_func(struct wo
 	 * process the pending transaction.
 	 */
 	fcopy_respond_to_host(HV_E_FAIL);
+	pr_info("FCP: timeout after %d seconds\n", HV_UTIL_TIMEOUT);
 	hv_poll_channel(fcopy_transaction.recv_channel, fcopy_poll_wrapper);
 }
 
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -34,7 +34,7 @@
 /*
  * Timeout for services such as KVP and fcopy.
  */
-#define HV_UTIL_TIMEOUT 30
+#define HV_UTIL_TIMEOUT 60
 
 /*
  * Timeout for guest-host handshake for services.