[PATCH 1/3][FGH][linux] video: hyperv_fb: Add ratelimit on error message
Tim Gardner
tim.gardner at canonical.com
Thu May 6 22:30:21 UTC 2021
From: Michael Kelley <mikelley at microsoft.com>
BugLink: https://bugs.launchpad.net/bugs/1927518
Due to a full ring buffer, the driver may be unable to send updates to
the Hyper-V host. But outputing the error message can make the problem
worse because console output is also typically written to the frame
buffer. As a result, in some circumstances the error message is output
continuously.
Break the cycle by rate limiting the error message. Also output
the error code for additional diagnosability.
Signed-off-by: Michael Kelley <mikelley at microsoft.com>
Link: https://lore.kernel.org/r/1618933459-10585-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu at kernel.org>
(cherry picked from commit aa5b7d11c7cb87c266d705b237368985e7171958)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
drivers/video/fbdev/hyperv_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index 4dc9077dd2ac..a7e6eea2c4a1 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
@@ -308,7 +308,7 @@ static inline int synthvid_send(struct hv_device *hdev,
VM_PKT_DATA_INBAND, 0);
if (ret)
- pr_err("Unable to send packet via vmbus\n");
+ pr_err_ratelimited("Unable to send packet via vmbus; error %d\n", ret);
return ret;
}
--
2.17.1
More information about the kernel-team
mailing list