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]
Date:	Tue, 22 Dec 2015 16:40:24 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	kraigatgoog@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/4] soreuseport: define reuseport groups

From: Craig Gallek <kraigatgoog@...il.com>
Date: Tue, 22 Dec 2015 15:05:07 -0500

> +	for (i = 0; i < reuse->num_socks; i++) {
> +		if (reuse->socks[i] == sk) {
> +			reuse->socks[i] = reuse->socks[reuse->num_socks - 1];
> +			reuse->num_socks--;
> +			if (reuse->num_socks == 0)
> +				kfree_rcu(reuse, rcu);
> +			break;
> +		}
> +	}

Don't you need to memmove() the entire rest of the array down one slot
when you hit the matching 'sk' in there?  I can't see how it can work
to only move one entry down.
--
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