Re: [PATCH v3] drm/v3d: Fix double free of query arrays on parse failure

From: Maíra Canal

Date: Wed Nov 25 2026 - 10:50:22 EST



On Tue, 24 Nov 2026 11:37:23 +0000, Xiaolei Wang wrote:
> On a parse error the timestamp and performance parsers free the query
> array, and the job release path then frees it again: query_info->count
> had not been set yet, so no syncobj was put twice, but the stale array
> was handed to kvfree() a second time.
>
> Make the job the only owner: the parsers just fill the array and record
> how far they got. count is set before the parse loop, the arrays are
> zero allocated, and the free helpers stop at the first entry that was
> never set up, which keeps put-count equal to find-count. That also
> removes the inline kvfree() of kperfmon_ids and the count arguments of
> the free helpers.
>
> [...]

Applied to drm-misc-fixes with correct Fixes tags, thanks!

[1/1] drm/v3d: Fix double free of query arrays on parse failure
commit: 1c986bc5918cbbb438eb57211c9d0b3de2878cd0

Best regards,
- Maíra