Re: [PATCH v6 0/5] zram: fix zstd error paths and add parameter validation

Andrew Morton <[email protected]> Tue, 4 Aug 2026 12:55:29 -0700
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue,  4 Aug 2026 17:38:36 +0800 Haoqin Huang <[email protected]> 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/[email protected]