cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gong Ruiqi <gongruiqi1@huawei.com>
To: Michal Hocko <mhocko@suse.com>
Cc: <linux-kernel@vger.kernel.org>, <stable@vger.kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeelb@google.com>,
	Muchun Song <muchun.song@linux.dev>, <cgroups@vger.kernel.org>,
	<linux-mm@kvack.org>, Wang Weiyang <wangweiyang2@huawei.com>,
	Xiu Jianfeng <xiujianfeng@huawei.com>
Subject: Re: [PATCH stable] memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock()
Date: Thu, 22 Feb 2024 10:01:06 +0800	[thread overview]
Message-ID: <9e5b19c7-1f57-5f19-6331-75c2cfc7800f@huawei.com> (raw)
In-Reply-To: <ZdXLgjpUfpwEwAe0@tiehlicka>



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.

> [...]

  parent reply	other threads:[~2024-02-22  2:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  8:18 [PATCH stable] memcg: add refcnt for pcpu stock to avoid UAF problem in drain_all_stock() GONG, Ruiqi
2024-02-21  8:38 ` Michal Hocko
2024-02-21  9:50   ` Gong Ruiqi
2024-02-21 10:08     ` Michal Hocko
2024-02-21 10:22       ` Michal Hocko
2024-02-22  2:01       ` Gong Ruiqi [this message]
2024-02-21  8:40 ` Greg KH
2024-02-21  8:48   ` Michal Hocko
2024-02-21 10:33     ` Greg KH
2024-02-21 10:48       ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e5b19c7-1f57-5f19-6331-75c2cfc7800f@huawei.com \
    --to=gongruiqi1@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=stable@vger.kernel.org \
    --cc=wangweiyang2@huawei.com \
    --cc=xiujianfeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).