Re: [PATCH] ublk: validate all parameters for zoned devices
From: Ming Lei
Date: Sun Nov 15 2026 - 04:40:34 EST
On Sat, Nov 14, 2026 at 10:33 AM <shao.mingyin@xxxxxxxxxx> wrote:
>
> From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
>
> ublk_validate_params() returns as soon as zoned parameters are valid,
> skipping the subsequent DMA alignment, segment and integrity checks.
> SET_PARAMS therefore accepts combinations that it rejects for a
> non-zoned device, including integrity parameters without UBLK_F_INTEGRITY.
> Invalid parameters may reach disk creation or advertise an integrity
> format that the server cannot access.
>
> Continue checking the remaining parameter types after successful zoned
> validation. Preserve the zoned validator's errors and the requirement
> for zoned devices to supply zoned parameters.
>
> Fixes: e84025d2a9cb ("ublk: add DMA alignment limit")
> Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
Reviewed-by: Ming Lei <tom.leiming@xxxxxxxxx>
Thanks,