Whamcloud - gitweb
LU-10220 mdd: fix buf alloc in mdd_changelog_data_store_by_fid 56/30356/2
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 9 Nov 2017 15:48:08 +0000 (00:48 +0900)
committerJohn L. Hammond <john.hammond@intel.com>
Wed, 6 Dec 2017 01:25:37 +0000 (01:25 +0000)
commit5ecf0ab240334b48378a1dd7e8dea068f4ef31ab
tree65bddc2a07f9d5b848608f7c807346740a5407c8
parent2f7cf70d70db2e3a801644f6d7eaeb09311e322b
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.

Lustre-change: https://review.whamcloud.com/30014
Lustre-commit: f173f93032c62bd1f95330f331d3d93ce5a31598

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Id0a06c412b54c0ae12c15d53f3e166e3e5d9ed68
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>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/30356
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_internal.h
lustre/mdd/mdd_object.c