Whamcloud - gitweb
LU-17000 obdclass: Initialize var 'bufsize' before using 91/55291/2
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 3 Jun 2024 10:01:04 +0000 (06:01 -0400)
committerOleg Drokin <green@whamcloud.com>
Mon, 10 Jun 2024 06:15:03 +0000 (06:15 +0000)
commit40cc9697fa0b0ccec43d9e519805fb4c13c70490
tree53343fe6ca57faa696ad28513f2042a4946c2601
parentebb323b2e0befeda5db7d628ea617682d87aa98e
LU-17000 obdclass: Initialize var 'bufsize' before using

This patch initialize variable bufsize before using. This is because
bufsize is left uninitialized if obd_page_dif_generate_buffer() calls
fails. Once bufsize is initialize calling cfs_crypto_hash_final()
becomes safe.

Test-Parameters: trivial
CoverityID: 397224 ("Uninitialized scalar variable")
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I933cc3746d107acb308bd0060b7648a82410711c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55291
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/integrity.c