msm: kgsl: Limit the HFI error log to 16 characters

The HFI error message has a 16 character error string attached. We should
not trust that the error string is properly formatted with a null
character at the end. Set the string precision to ensure that we only
print up to 16 characters of the payload.

Change-Id: Ic0dedbad1b2aebef1feb3f9f7f531869e96599e6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This commit is contained in:
Jordan Crouse 2020-07-16 17:44:56 -06:00
commit b2e689c2c7

View file

@ -517,7 +517,7 @@ static void receive_err_req(struct a6xx_gmu_device *gmu, void *rcvd)
{
struct hfi_err_cmd *cmd = rcvd;
dev_err(&gmu->pdev->dev, "HFI Error Received: %d %d %s\n",
dev_err(&gmu->pdev->dev, "HFI Error Received: %d %d %.16s\n",
((cmd->error_code >> 16) & 0xFFFF),
(cmd->error_code & 0xFFFF),
(char *) cmd->data);