[PATCH v4] ubifs: make ubifs_[get|set]xattr atomic

Dongsheng Yang yangds.fnst at cn.fujitsu.com
Fri Nov 6 20:36:08 PST 2015


On 08/18/2015 04:43 PM, Artem Bityutskiy wrote:
> On Tue, 2015-08-18 at 12:38 +0800, Dongsheng Yang wrote:
>> 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.
>
> Picked this one, thanks!

Hi Artem and Richard,
	I did not find this one in linux-ubifs.git, is that
planed for 4.4?

Yang

> .
>




More information about the linux-mtd mailing list