On 11. Mar 2026, at 16:16, Ard Biesheuvel wrote:
> On Wed, 11 Mar 2026, at 16:09, Thorsten Blum wrote:
>> The bounce buffers are allocated with __get_free_pages() using
>> BOUNCE_BUFFER_ORDER (order 2 = 4 pages), but both the allocation error
>> path and nx842_crypto_free_ctx() release the buffers with free_page().
>> Use free_pages() with the matching order instead.
>> 
>> Also, since the scomp conversion, nx842_crypto_alloc_ctx() allocates the
>> context separately, but nx842_crypto_free_ctx() never releases it. Add
>> the missing kfree(ctx) in nx842_crypto_free_ctx(), and reuse
>> nx842_crypto_free_ctx() in the allocation error path.
>> 
>> Fixes: ed70b479c2c0 ("crypto: nx - add hardware 842 crypto comp alg")
>> Fixes: 980b5705f4e7 ("crypto: nx - Migrate to scomp API")
> 
> Thanks for the fixes.
> 
> Given that you are fixing two separate issues that were introduced ~10 years 
> apart, I think it would be better to split this up.

Yes, good idea. I submitted them separately here:

https://lore.kernel.org/lkml/[email protected]/

Thanks,
Thorsten


Reply via email to