Whamcloud - gitweb
LU-13040 lmv: Pool name string handling 08/36908/13
authorShaun Tancheff <shaun.tancheff@hpe.com>
Thu, 20 Feb 2020 17:11:14 +0000 (11:11 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 1 Mar 2020 05:35:45 +0000 (05:35 +0000)
commit5a798e527b8e852363858bd568f297520a5325fd
tree20c2844a8a37eac29111a4feda604f5df48a4f3a
parentf3e101a36310c0c2b9d516c09ec0166eb24524d2
LU-13040 lmv: Pool name string handling

KASAN picked up a case where pool_name may not be null
terminated.

There are a few cases where strncpy is used, however strncpy does
not guarantee the target string is null terminated. The preference
is to use strlcpy.

Cray-bug-id: LUS-8229
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I414e955b5964c24b061edd76ed9e64a8985c537d
Reviewed-on: https://review.whamcloud.com/36908
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_lmv.h
lustre/lmv/lmv_obd.c
lustre/mgs/mgs_handler.c