mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
Add validation that the info size returned from the metric stream info
query is not exceeded when checked against the allocated buffer size.
If the firmware returns a size larger than the buffer, reject the
operation with -EOVERFLOW instead of proceeding with an incorrect
buffer copy.
Fixes: cdfad4db77 ("accel/ivpu: Add NPU profiling support")
Cc: [email protected] # v6.18+
Signed-off-by: Andrzej Kacprowski <[email protected]>
Reviewed-by: Karol Wachowski <[email protected]>
Signed-off-by: Karol Wachowski <[email protected]>
Link: https://patch.msgid.link/[email protected]