[Bridge] [PATCH v2] netfilter: account ebt_table_info to kmemcg

Kirill Tkhai ktkhai at virtuozzo.com
Thu Jan 10 09:48:17 UTC 2019


On 10.01.2019 12:41, Michal Hocko wrote:
> On Thu 10-01-19 12:22:09, Kirill Tkhai wrote:
> [...]
>>>> diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
>>>> index 491828713e0b..5e55cef0cec3 100644
>>>> --- a/net/bridge/netfilter/ebtables.c
>>>> +++ b/net/bridge/netfilter/ebtables.c
>>>> @@ -1137,14 +1137,16 @@ static int do_replace(struct net *net, const void __user *user,
>>>>  	tmp.name[sizeof(tmp.name) - 1] = 0;
>>>>  
>>>>  	countersize = COUNTER_OFFSET(tmp.nentries) * nr_cpu_ids;
>>>> -	newinfo = vmalloc(sizeof(*newinfo) + countersize);
>>>> +	newinfo = __vmalloc(sizeof(*newinfo) + countersize, GFP_KERNEL_ACCOUNT,
>>>> +			    PAGE_KERNEL);
>>
>> Do we need GFP_HIGHMEM here?
> 
> No. vmalloc adds __GPF_HIGHMEM implicitly (see __vmalloc_area_node).

Then OK, thanks for the explanation.

Kirill


More information about the Bridge mailing list