Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6424e48 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix xattr dangling pointer / double free



If we use the xattr_blob, clear the pointer so we don't release the memory
at the bottom of the fuction.

Reported-by: default avatarHenry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 9dd4658d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -619,6 +619,7 @@ static int fill_inode(struct inode *inode,
			memcpy(ci->i_xattrs.blob->vec.iov_base,
			       iinfo->xattr_data, iinfo->xattr_len);
		ci->i_xattrs.version = le64_to_cpu(info->xattr_version);
		xattr_blob = NULL;
	}

	inode->i_mapping->a_ops = &ceph_aops;