lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 14 Nov 2020 22:47:33 -0800
From:   Dongli Zhang <>
To:     Eric Dumazet <>,
        Matthew Wilcox <>
        Aruna Ramakrishna <>,
        Bert Barbe <>,
        Rama Nichanamatlu <>,
        Venkat Venkatsubra <>,
        Manjunath Patil <>,
        Joe Jin <>,
        SRINIVAS <>,,
Subject: Re: [PATCH] page_frag: Recover from memory pressure

>From linux-next, this patch is not in akpm branch.

According to discussion with Matthew offline, I will take the author of this
patch as Matthew was providing review for patch and suggesting a better

Therefore, it will be much more easier or me to track this patch.

I will re-send the patch as v2 with:

1. change author from Matthew to Dongli
2. Add references to all prior discussions
3. Add more details to commit message so that it is much more easier to search
online when this issue is encountered by other people again.
4. Add "Acked-by: Vlastimil Babka <>".

Thank you very much!

Dongli Zhang

On 11/9/20 6:37 AM, Eric Dumazet wrote:
> On 11/9/20 3:32 PM, Matthew Wilcox wrote:
>> On Thu, Nov 05, 2020 at 02:02:24PM +0000, Matthew Wilcox wrote:
>>> On Thu, Nov 05, 2020 at 02:21:25PM +0100, Eric Dumazet wrote:
>>>> On 11/5/20 5:21 AM, Matthew Wilcox (Oracle) wrote:
>>>>> When the machine is under extreme memory pressure, the page_frag allocator
>>>>> signals this to the networking stack by marking allocations with the
>>>>> 'pfmemalloc' flag, which causes non-essential packets to be dropped.
>>>>> Unfortunately, even after the machine recovers from the low memory
>>>>> condition, the page continues to be used by the page_frag allocator,
>>>>> so all allocations from this page will continue to be dropped.
>>>>> Fix this by freeing and re-allocating the page instead of recycling it.
>>>>> Reported-by: Dongli Zhang <>
>>>>> Cc: Aruna Ramakrishna <>
>>>>> Cc: Bert Barbe <>
>>>>> Cc: Rama Nichanamatlu <>
>>>>> Cc: Venkat Venkatsubra <>
>>>>> Cc: Manjunath Patil <>
>>>>> Cc: Joe Jin <>
>>>>> Cc: SRINIVAS <>
>>>>> Cc:
>>>>> Fixes: 79930f5892e ("net: do not deplete pfmemalloc reserve")
>>>> Your patch looks fine, although this Fixes: tag seems incorrect.
>>>> 79930f5892e ("net: do not deplete pfmemalloc reserve") was propagating
>>>> the page pfmemalloc status into the skb, and seems correct to me.
>>>> The bug was the page_frag_alloc() was keeping a problematic page for
>>>> an arbitrary period of time ?
>>> Isn't this the commit which unmasks the problem, though?  I don't think
>>> it's the buggy commit, but if your tree doesn't have 79930f5892e, then
>>> you don't need this patch.
>>> Or are you saying the problem dates back all the way to
>>> c93bdd0e03e8 ("netvm: allow skb allocation to use PFMEMALLOC reserves")
>>>>> +		if (nc->pfmemalloc) {
>>>>                 if (unlikely(nc->pfmemalloc)) {
>>> ACK.  Will make the change once we've settled on an appropriate Fixes tag.
>> Which commit should I claim this fixes?
> Hmm, no big deal, lets not waste time on tracking precise bug origin.

Powered by blists - more mailing lists