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: <20080819004129.GC23626@verge.net.au>
Date:	Tue, 19 Aug 2008 10:41:30 +1000
From:	Simon Horman <horms@...ge.net.au>
To:	Sven Wegener <sven.wegener@...aler.net>
Cc:	netdev@...r.kernel.org, lvs-devel@...r.kernel.org,
	wensong@...ux-vs.org, ja@....bg
Subject: Re: [PATCH] ipvs: Fix race conditions in lblcr scheduler

On Tue, Aug 19, 2008 at 01:42:41AM +0200, Sven Wegener wrote:
> On Tue, 19 Aug 2008, Simon Horman wrote:
> 
> > On Mon, Aug 18, 2008 at 12:53:05AM +0200, Sven Wegener wrote:
> > > We can't access the cache entry outside of our critical read-locked region,
> > > because someone may free that entry. Also getting an entry under read lock,
> > > then locking for write and trying to delete that entry looks fishy, but should
> > > be no problem here, because we're only comparing a pointer. Also there is no
> > > need for our own rwlock, there is already one in the service structure for use
> > > in the schedulers.
> > 
> > Hi Sven,
> > 
> > this looks good to me. Just a few minor comments inline.
> > 
> > > Signed-off-by: Sven Wegener <sven.wegener@...aler.net>
> > > ---
> > >  net/ipv4/ipvs/ip_vs_lblcr.c |  229 +++++++++++++++++++++----------------------
> > >  1 files changed, 114 insertions(+), 115 deletions(-)
> > > 
> > > diff --git a/net/ipv4/ipvs/ip_vs_lblcr.c b/net/ipv4/ipvs/ip_vs_lblcr.c
> > > index f1c8450..96bfdc2 100644
> > > --- a/net/ipv4/ipvs/ip_vs_lblcr.c
> > > +++ b/net/ipv4/ipvs/ip_vs_lblcr.c
> > > @@ -106,7 +106,7 @@ ip_vs_dest_set_insert(struct ip_vs_dest_set *set, struct ip_vs_dest *dest)
> > >  			return NULL;
> > >  	}
> > >  
> > > -	e = kmalloc(sizeof(struct ip_vs_dest_list), GFP_ATOMIC);
> > > +	e = kmalloc(sizeof(*e), GFP_ATOMIC);
> > 
> > I think that I prefer using struct ip_vs_dest_list rather than *e.
> > Ditto for *tbl below.
> 
> Actually, it's part of CodingStyle to use *e.
> 
> > > +out:
> > >  	IP_VS_DBG(6, "LBLCR: destination IP address %u.%u.%u.%u "
> > >  		  "--> server %u.%u.%u.%u:%d\n",
> > > -		  NIPQUAD(en->addr),
> > > +		  NIPQUAD(iph->addr),
> > 
> > Minor problem, this should be iph->daddr
> 
> Good catch, I've updated my patch locally. Let's get a consensus on the 
> sizeof issue and I'll repost.

I'm happy with sizeof(*ptr) now. So I think that the lblc patch is ready
and this one just needs the minor daddr fix.

--
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