Whamcloud - gitweb
LU-17911 lustre: fix faked flexible arrays in getinfo_fid2path 54/55354/5
authorBruno Faccini <bfaccini@nvidia.com>
Fri, 7 Jun 2024 09:22:44 +0000 (11:22 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Jun 2024 03:24:17 +0000 (03:24 +0000)
commit3eb2f75836e822cdf411823330c36ba13f2339ee
treecff5e65bb6e876f895d476348be9f53d35768e67
parent78b10a7481251a673b007eedaf3ff3909f2154fc
LU-17911 lustre: fix faked flexible arrays in getinfo_fid2path

faked (0-length) flexible arrays need some rework to comply with
new coding rules to stay Fortify feature compliant (see document
at https://people.kernel.org/kees/bounded-flexible-arrays-in-c).
With this particular getinfo_fid2path struct content, we ended-up
with generated code causing straight crash upon each call of
lmv_fid2path routine upon strlen() first call.

Signed-off-by: Bruno Faccini <bfaccini@nvidia.com>
Change-Id: Id6f594779ca0ae86f0c2842535abccbf4df688d3
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55354
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_idl.h