Re: [PATCH] liveupdate: drop redundant lower-bound check in luo_session_ioctl

From: Mike Rapoport

Date: Thu Nov 26 2026 - 06:46:19 EST


From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

On Fri, 20 Nov 2026 15:52:52 +0800, Xiaotao Zeng wrote:
> nr is unsigned, so for cmd values below LIVEUPDATE_CMD_SESSION_BASE the
> subtraction nr - LIVEUPDATE_CMD_SESSION_BASE wraps to a large value that
> is already rejected by the ARRAY_SIZE() upper-bound check. The lower
> bound test is therefore redundant.
>
> Drop it so the check matches the one in luo_ioctl().
>
> [...]

Applied to liveupdate-7.5 branch of liveupdate/linux.git tree, thanks!

[1/1] liveupdate: drop redundant lower-bound check in luo_session_ioctl
commit: cba589505b0ec93075c6b17abf502a777f034133

tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: liveupdate-7.5

--
Sincerely yours,
Mike.