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

Commit 84c9328b authored by Dongsheng Yang's avatar Dongsheng Yang Committed by Nikhilesh Reddy
Browse files

ubifs: make ubifs_[get|set]xattr atomic



This commit make the ubifs_[get|set]xattr protected by ui_mutex.

Originally, there is a possibility that ubifs_getxattr to get
a wrong value.

  P1                                  P2
----------                  	----------
ubifs_getxattr                      ubifs_setxattr
					- kfree()
- memcpy()
					- kmemdup()

Then ubifs_getxattr() would get a non-sense data. To solve this
problem, this commit make the xattr of ubifs_inode updated in
atomic.

CRs-Fixed: 975289
Change-Id: I4b963339a2fa7465528a24d06f9df57a455bdf12
Signed-off-by: default avatarDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: ab92a20bce3b4c21927cc1ae514c482f50ad3487
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent f702a6ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment