lmm is used as a temporary pointer to structure, it can get moved within
the buffer while @size remain the same. this may cause invalid memory
access.
Change-Id: Iecc51e8bb75c678e7d8287b3798afbab8bfd1485
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34901
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
if (IS_ERR(handle))
GOTO(out, rc = PTR_ERR(handle));
- lfsck_buf_init(&ea_buf, lmm, size);
+ lfsck_buf_init(&ea_buf, buf->lb_buf, size);
rc = dt_declare_xattr_set(env, obj, &ea_buf, XATTR_NAME_LOV,
LU_XATTR_REPLACE, handle);
if (rc != 0)