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]
Date:	Thu, 21 Jul 2016 19:01:00 +0200
From:	Pablo Neira Ayuso <pablo@...filter.org>
To:	fgao@...ai8.com
Cc:	kaber@...sh.net, netfilter-devel@...r.kernel.org,
	netdev@...r.kernel.org, gfree.wind@...il.com
Subject: Re: [PATCH 1/1] netfilter: Use IS_ERR_OR_NULL instead of IS_ERR and
 NULl check to simplify the codes in ip_vs_genl_dump_dests and
 resolve_normal_ct

On Thu, Jul 21, 2016 at 06:45:53PM +0200, Pablo Neira Ayuso wrote:
> > diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
> > index 153e33f..634d592 100644
> > --- a/net/netfilter/nf_conntrack_core.c
> > +++ b/net/netfilter/nf_conntrack_core.c
> > @@ -1108,10 +1108,8 @@ resolve_normal_ct(struct net *net, struct nf_conn *tmpl,
> >  	if (!h) {
> >  		h = init_conntrack(net, tmpl, &tuple, l3proto, l4proto,
> >  				   skb, dataoff, hash);
> > -		if (!h)
> > -			return NULL;
> > -		if (IS_ERR(h))
> > -			return (void *)h;
> > +		if (IS_ERR_OR_NULL(h))
> > +			return ERR_CAST(h);
> 
> Interesting.
> 
> I think we can actually simplify this patch, I'm sending a patch for
> this now.

Forget this, I cannot actually achieve the simplification, we need the
ENOMEM to drop packets when we're under stress.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ