diff options
| author | Pavel Butsykin <pbutsykin@cloudlinux.com> | 2025-12-31 11:46:38 +0400 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-01-14 22:16:24 -0800 |
| commit | 590b13669b813d55844fecd9142c56abd567914d (patch) | |
| tree | 65f76f1ba4f49c88c0f4a02fd0d219c62ada0b65 /include/linux/platform_data/git@git.tavy.me:linux.git | |
| parent | 392b3d9d595f34877dd745b470c711e8ebcd225c (diff) | |
mm/zswap: fix error pointer free in zswap_cpu_comp_prepare()
crypto_alloc_acomp_node() may return ERR_PTR(), but the fail path checks
only for NULL and can pass an error pointer to crypto_free_acomp(). Use
IS_ERR_OR_NULL() to only free valid acomp instances.
Link: https://lkml.kernel.org/r/20251231074638.2564302-1-pbutsykin@cloudlinux.com
Fixes: 779b9955f643 ("mm: zswap: move allocations during CPU init outside the lock")
Signed-off-by: Pavel Butsykin <pbutsykin@cloudlinux.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Acked-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/platform_data/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
