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]
Message-Id: <201004120706.o3C76sKG000644@www262.sakura.ne.jp>
Date:	Mon, 12 Apr 2010 16:06:54 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:	amwang@...hat.com
Cc:	linux-kernel@...r.kernel.org, opurdila@...acom.com,
	eric.dumazet@...il.com, netdev@...r.kernel.org,
	nhorman@...driver.com, davem@...emloft.net, ebiederm@...ssion.com
Subject: Re: [Patch 3/3] net: reserve ports for applications using fixed port numbers

Cong Wang wrote:
> Tetsuo Handa wrote:
> >> Index: linux-2.6/net/sctp/socket.c
> >> ===================================================================
> >> --- linux-2.6.orig/net/sctp/socket.c
> >> +++ linux-2.6/net/sctp/socket.c
> >> @@ -5436,6 +5436,8 @@ static long sctp_get_port_local(struct s
> >>  			rover++;
> >>  			if ((rover < low) || (rover > high))
> >>  				rover = low;
> >> +			if (inet_is_reserved_local_port(rover))
> >> +				continue;
> > 
> > This one needs to be
> > 
> > 			if (inet_is_reserved_local_port(rover))
> > 				goto next_nolock;
> > 
> >>  			index = sctp_phashfn(rover);
> >>  			head = &sctp_port_hashtable[index];
> >>  			sctp_spin_lock(&head->lock);
> > 
> >  next:
> > 			sctp_spin_unlock(&head->lock);
> > +next_nolock:
> > 		} while (--remaining > 0);
> > 
> > otherwise, it will loop forever if all ports were reserved.
> 
> Sorry, doesn't 'continue' jump to exactly where 'next_nolock' is??
> Or I am missing something?

My misreading, sorry.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ