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:	Fri, 2 Aug 2013 13:52:44 +0200
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Laura Mihaela Vasilescu <laura.vasilescu@...edu.org>
CC:	<netdev@...r.kernel.org>, <carolyn.wyborny@...el.com>,
	<anjali.singhai@...el.com>, <jeffrey.t.kirsher@...el.com>,
	<alexander.h.duyck@...el.com>
Subject: Re: [PATCH 2/2] igb: Expose RSS indirection table for ethtool

On Wed, 2013-07-31 at 11:43 +0300, Laura Mihaela Vasilescu wrote:
[...]
> +static int igb_set_rxfh_indir(struct net_device *netdev, const u32 *indir)
> +{
> +	struct igb_adapter *adapter = netdev_priv(netdev);
> +	struct e1000_hw *hw = &adapter->hw;
> +	int i;
> +	u32 num_queues;
> +
> +	num_queues = adapter->rss_queues;
> +
> +	switch (hw->mac.type) {
> +	case e1000_82576:
> +		/* 82576 supports 2 RSS queues for SR-IOV */
> +		if (adapter->vfs_allocated_count)
> +			num_queues = 2;
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	/* Verify user input. */
> +	for (i = 0; i < IGB_RETA_SIZE; i++)
> +		if (indir[i] > num_queues)
> +			return -EINVAL;
[...]

Surely the comparison should be >= ?

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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