]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb/client: check if ntstatus_to_dos_map is sorted
authorYouling Tang <tangyouling@kylinos.cn>
Thu, 2 Apr 2026 14:18:32 +0000 (14:18 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 6 Apr 2026 00:58:40 +0000 (19:58 -0500)
commit010ad1e895dbe269ab4f97b3e5245deefcc6205f
treed63dcabc23df262e110ce83e141eee820e394a01
parent3c6c23ed9424cfd5a648863dc058c52094b1b99d
smb/client: check if ntstatus_to_dos_map is sorted

Although the array is sorted at build time, verify the ordering again
when cifs.ko is loaded to avoid potential regressions introduced by
future script changes.

We are going to define 3 functions to check the sort results, introduce the
macro DEFINE_CHECK_SORT_FUNC() to reduce duplicate code.

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.c
fs/smb/client/smb1maperror.c
fs/smb/client/smb1proto.h