lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <e8756edc-1c85-4a03-9c6b-663a9e7d46eb@suse.cz>
Date: Tue, 10 Sep 2024 11:19:29 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: Paolo Abeni <pabeni@...hat.com>, Shakeel Butt <shakeel.butt@...ux.dev>,
 Andrew Morton <akpm@...ux-foundation.org>
Cc: Johannes Weiner <hannes@...xchg.org>, Michal Hocko <mhocko@...nel.org>,
 Roman Gushchin <roman.gushchin@...ux.dev>,
 Muchun Song <muchun.song@...ux.dev>, David Rientjes <rientjes@...gle.com>,
 Hyeonggon Yoo <42.hyeyoo@...il.com>, Eric Dumazet <edumazet@...gle.com>,
 "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org,
 Meta kernel team <kernel-team@...a.com>, cgroups@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH v4] memcg: add charging of already allocated slab objects

On 9/10/24 10:26, Paolo Abeni wrote:
> On 9/5/24 19:34, Shakeel Butt wrote:
>>    * kmem_cache_alloc_node - Allocate an object on the specified node
>>    * @s: The cache to allocate from.
>> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
>> index 64d07b842e73..3c13ca8c11fb 100644
>> --- a/net/ipv4/inet_connection_sock.c
>> +++ b/net/ipv4/inet_connection_sock.c
>> @@ -715,6 +715,7 @@ struct sock *inet_csk_accept(struct sock *sk, struct proto_accept_arg *arg)
>>   	release_sock(sk);
>>   	if (newsk && mem_cgroup_sockets_enabled) {
>>   		int amt = 0;
>> +		gfp_t gfp = GFP_KERNEL | __GFP_NOFAIL;
>>   
>>   		/* atomically get the memory usage, set and charge the
>>   		 * newsk->sk_memcg.
>> @@ -731,8 +732,8 @@ struct sock *inet_csk_accept(struct sock *sk, struct proto_accept_arg *arg)
>>   		}
>>   
>>   		if (amt)
>> -			mem_cgroup_charge_skmem(newsk->sk_memcg, amt,
>> -						GFP_KERNEL | __GFP_NOFAIL);
>> +			mem_cgroup_charge_skmem(newsk->sk_memcg, amt, gfp);
>> +		kmem_cache_charge(newsk, gfp);
>>   
>>   		release_sock(newsk);
>>   	}
> 
> The networking bits looks sane to me - with a very minor nit about the 
> reverse xmas tree order in variables declaration above.
> 
> Acked-by: Paolo Abeni <pabeni@...hat.com>

Great, thanks, I will adjust the ordering.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ