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:Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Signed-off-by:
Richard Weinberger <richard@nod.at> Git-commit: ab92a20bce3b4c21927cc1ae514c482f50ad3487 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Nikhilesh Reddy <reddyn@codeaurora.org>
Loading
Please register or sign in to comment