Whamcloud - gitweb
LU-10220 mdd: fix buf alloc in mdd_changelog_data_store_by_fid 14/30014/5
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 9 Nov 2017 15:48:08 +0000 (00:48 +0900)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 1 Dec 2017 05:14:41 +0000 (05:14 +0000)
commitf173f93032c62bd1f95330f331d3d93ce5a31598
treecb3e3d67081c98aa2462b14ddcca53e6f324d3a6
parent0457798e95e3628d7b4f0894fdc2dd13c2dd23f6
LU-10220 mdd: fix buf alloc in mdd_changelog_data_store_by_fid

Fix allocation of mti_big_buf by call to lu_buf_check_and_alloc()
in mdd_changelog_data_store_by_fid().
reclen must take the header size of struct llog_changelog_rec into
account.

Maybe no memory corruptions were seen before because the buffer size
allocated in a previous call to mdd_declare_changelog_store() was
covering the need. But audit will add more information in changelog
records, provoking memory corruptions without this fix.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id0a06c412b54c0ae12c15d53f3e166e3e5d9ed68
Reviewed-on: https://review.whamcloud.com/30014
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c