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-next>] [day] [month] [year] [list]
Date:	Mon, 11 Feb 2013 18:13:32 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Yan Burman <yanb@...lanox.com>,
	Amir Vadai <amirv@...lanox.com>,
	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
	Sasha Levin <sasha.levin@...cle.com>
Subject: linux-next: build failure after merge of the akpm tree

Hi Andrew,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/net/ethernet/mellanox/mlx4/en_rx.c: In function 'mlx4_en_process_rx_cq':
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:53: error: macro "hlist_for_each_entry_rcu" passed 4 arguments, but takes just 3
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:5: error: 'hlist_for_each_entry_rcu' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_rx.c:628:55: error: expected ';' before '{' token

Caused by commit c07cb4b0ab78 ("net/mlx4_en: Manage hash of MAC addresses
per port") from the net-next tree interacting with commit "hlist: drop
the node parameter from iterators" from the akpm tree.

I applied the following merge fix patch for today:

From 7a10f5e7e8d1232d618307d568ea9a78dc4680bb Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Mon, 11 Feb 2013 18:01:23 +1100
Subject: [PATCH] net/mlx4_en: fix up for hlist_for_each_entry_rcu API change

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index ce38654..19a9c05 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -617,7 +617,6 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 
 			if (is_multicast_ether_addr(ethh->h_dest)) {
 				struct mlx4_mac_entry *entry;
-				struct hlist_node *n;
 				struct hlist_head *bucket;
 				unsigned int mac_hash;
 
@@ -625,7 +624,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 				mac_hash = ethh->h_source[MLX4_EN_MAC_HASH_IDX];
 				bucket = &priv->mac_hash[mac_hash];
 				rcu_read_lock();
-				hlist_for_each_entry_rcu(entry, n, bucket, hlist) {
+				hlist_for_each_entry_rcu(entry, bucket, hlist) {
 					if (ether_addr_equal_64bits(entry->mac,
 								    ethh->h_source)) {
 						rcu_read_unlock();
-- 
1.8.1

That then lead to these:

drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_put_qp':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:582:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_replace_mac':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:615:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c: In function 'mlx4_en_do_uc_filter':
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:57: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1037:59: error: expected ';' before '{' token
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:47: error: macro "hlist_for_each_entry" passed 4 arguments, but takes just 3
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:3: error: 'hlist_for_each_entry' undeclared (first use in this function)
drivers/net/ethernet/mellanox/mlx4/en_netdev.c:1080:49: error: expected ';' before '{' token

For which I applied this:

From 8b8154323c7a63c29bb2d7613742ca2bb417efc3 Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Mon, 11 Feb 2013 18:10:36 +1100
Subject: [PATCH] net/mlx4_en: second fix up for hlist_for_each_entry_rcu API
 change

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 77c4f55..bb53a72 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -573,13 +573,13 @@ static void mlx4_en_put_qp(struct mlx4_en_priv *priv)
 
 	if (dev->caps.steering_mode != MLX4_STEERING_MODE_A0) {
 		struct mlx4_mac_entry *entry;
-		struct hlist_node *n, *tmp;
+		struct hlist_node *tmp;
 		struct hlist_head *bucket;
 		unsigned int mac_hash;
 
 		mac_hash = priv->dev->dev_addr[MLX4_EN_MAC_HASH_IDX];
 		bucket = &priv->mac_hash[mac_hash];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac,
 						    priv->dev->dev_addr)) {
 				en_dbg(DRV, priv, "Releasing qp: port %d, MAC %pM, qpn %d\n",
@@ -608,11 +608,11 @@ static int mlx4_en_replace_mac(struct mlx4_en_priv *priv, int qpn,
 		struct hlist_head *bucket;
 		unsigned int mac_hash;
 		struct mlx4_mac_entry *entry;
-		struct hlist_node *n, *tmp;
+		struct hlist_node *tmp;
 		u64 prev_mac_u64 = mlx4_en_mac_to_u64(prev_mac);
 
 		bucket = &priv->mac_hash[prev_mac[MLX4_EN_MAC_HASH_IDX]];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac, prev_mac)) {
 				mlx4_en_uc_steer_release(priv, entry->mac,
 							 qpn, entry->reg_id);
@@ -1018,7 +1018,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 {
 	struct netdev_hw_addr *ha;
 	struct mlx4_mac_entry *entry;
-	struct hlist_node *n, *tmp;
+	struct hlist_node *tmp;
 	bool found;
 	u64 mac;
 	int err = 0;
@@ -1034,7 +1034,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 	/* find what to remove */
 	for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) {
 		bucket = &priv->mac_hash[i];
-		hlist_for_each_entry_safe(entry, n, tmp, bucket, hlist) {
+		hlist_for_each_entry_safe(entry, tmp, bucket, hlist) {
 			found = false;
 			netdev_for_each_uc_addr(ha, dev) {
 				if (ether_addr_equal_64bits(entry->mac,
@@ -1077,7 +1077,7 @@ static void mlx4_en_do_uc_filter(struct mlx4_en_priv *priv,
 	netdev_for_each_uc_addr(ha, dev) {
 		found = false;
 		bucket = &priv->mac_hash[ha->addr[MLX4_EN_MAC_HASH_IDX]];
-		hlist_for_each_entry(entry, n, bucket, hlist) {
+		hlist_for_each_entry(entry, bucket, hlist) {
 			if (ether_addr_equal_64bits(entry->mac, ha->addr)) {
 				found = true;
 				break;
-- 
1.8.1

I will add these to the end of the akpm tree tomorrow.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ