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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131214.011942.1693344941253042499.davem@davemloft.net>
Date:	Sat, 14 Dec 2013 01:19:42 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] pkt_sched: fq: more robust memory allocation

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 12 Dec 2013 16:35:12 -0800

> @@ -578,15 +579,32 @@ static void fq_rehash(struct fq_sched_data *q,
>  	q->stat_gc_flows += fcnt;
>  }
>  
> -static int fq_resize(struct fq_sched_data *q, u32 log)
> +static void fq_free(void *addr)
>  {
> +	if (addr && is_vmalloc_addr(addr))
> +		vfree(addr);
> +	else
> +		kfree(addr);
> +}
 ...
> +	array = kmalloc_node(sz, GFP_KERNEL | __GFP_REPEAT | __GFP_NOWARN,
> +			     node);
> +	if (!array)
> +		array = vmalloc_node(sz, node);

Eric, please make a "fq_alloc()" which does this:

	x = kmalloc;
	if (!x)
		x = vmalloc;

dance, in order to complement fq_free().

thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ