Re: [PATCH stable] memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock()

Gong Ruiqi
2024-02-22T02:01:15Z

On 2024/02/21 18:08, Michal Hocko wrote:
> On Wed 21-02-24 17:50:27, Gong Ruiqi wrote:
>>
>> On 2024/02/21 16:38, Michal Hocko wrote:
>>> On Wed 21-02-24 16:18:01, GONG, Ruiqi wrote:
>>>> commit 1a3e1f40962c445b997151a542314f3c6097f8c3 upstream.
>>>
>>> I think it would be good to mention that this is only a partial backport
>>> and also explain why to do a partial rather than the full one.
>>>
>>
>> Okay. I think to fix this problem we should add refcnt relation between
>> memcg and stock, and since higher versions have achieved this, maybe
>> it's better to use the same code and align with them. So I put a "commit
>> xxx upstream" here, as requested in kernel docs[1]. So yes it's a
>> partial backport as we only need the stock part.
>
> I think it is sufficient to mention that this is a partial backport to
> minimize the fix to the bare minimum.
>

Okay. Then I will send a v2 and add a paragraph to mention this.

> …