Commit 9864756b authored by Alexandre Bailon's avatar Alexandre Bailon Committed by Greg Kroah-Hartman

greybus: loopback: fix invalid response size

The size of timestamps is not taken into account, which makes the
loopback driver in the firmware drop invalid packages.
Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 5c864e77
......@@ -534,8 +534,8 @@ static int gb_loopback_request_recv(u8 type, struct gb_operation *operation)
}
if (len) {
if (!gb_operation_response_alloc(operation, len,
GFP_KERNEL)) {
if (!gb_operation_response_alloc(operation,
len + sizeof(*response), GFP_KERNEL)) {
dev_err(dev, "error allocating response\n");
return -ENOMEM;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment