Re: [PATCH net-next 1/2] inetpeer: add namespace support for inetpeer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 05, 2012 at 05:40:19AM +0200, Eric Dumazet wrote:
> On Tue, 2012-06-05 at 10:23 +0800, Gao feng wrote:
> >  
> > +static int __net_init inetpeer_net_init(struct net *net)
> > +{
> > +
> > +	net->ipv4.peers = kmemdup(&v4_peers,
> > +				  sizeof(v4_peers),
> > +				  GFP_KERNEL);
> 
> kzalloc(), and init ->root to peer_avl_empty_rcu
> 
> > +	if (net->ipv4.peers == NULL)
> > +		return -1;

...and return -ENOMEM if memory allocation fails.

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux