Re: [PATCH v6 0/5] zram: fix zstd error paths and add parameter validation
From: Andrew Morton
Date: Tue Aug 04 2026 - 15:56:46 EST
On Tue, 4 Aug 2026 17:38:36 +0800 Haoqin Huang <haoqinhuang7@xxxxxxxxx> wrote:
> Patch 1 removes zstd_release_params() from both zstd_create() and
> zstd_setup_params() error paths -- the former is a layering violation
> in a per-CPU callback, the latter is redundant as zcomp_init() already
> calls release_params() on setup failure.
>
> Patch 2 rejects zero-size dictionaries and prints distinct error
> messages for sz < 0 (returns the original error code) and sz == 0
> ("empty file"). Currently errors are silently swallowed.
>
> Patch 3 adds pr_fmt to each backend file so that pr_err() messages
> are auto-prefixed with the algorithm name.
>
> Patch 4 validates dict and level parameters in each backend's
> .setup_params(), rejecting unsupported combinations and out-of-range
> levels.
>
> Patch 5 resets per-priority params on algorithm change before init.
>
Thanks. AI review pointed at a few things, most of them pre-existing:
https://sashiko.dev/#/patchset/20260804093841.67920-1-haoqinhuang7@xxxxxxxxx