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

Richard Weinberger richard at nod.at
Sat Nov 7 02:34:32 PST 2015


Am 07.11.2015 um 05:36 schrieb Dongsheng Yang:
> 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?

Hmm, it should. Artem, forgot to push?
Anyway, I've added it now to linux-ubifs.git master.

Thanks,
//richard



More information about the linux-mtd mailing list