Whamcloud - gitweb
LU-17911 lustre: fix faked flexible arrays in getinfo_fid2path
authorBruno Faccini <bfaccini@nvidia.com>
Fri, 7 Jun 2024 09:22:44 +0000 (11:22 +0200)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 3 Jul 2024 04:35:30 +0000 (04:35 +0000)
commit6b3176d3e7467c2b00f29115f7bb6bfdcbd30c93
treecdfa135e028bf0c0ecf898796c7e94228727f79a
parentdeaf3172c99db9e4c9ab75d657c598f732610276
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.

Lustre-change: https://review.whamcloud.com/55354
Lustre-commit: 3eb2f75836e822cdf411823330c36ba13f2339ee

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