* linux-next: build failure after merge of the akpm tree
@ 2011-09-30 5:32 Stephen Rothwell
2011-09-30 6:02 ` Andrew Morton
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2011-09-30 5:32 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-next, linux-kernel, Stephen Boyd, Ingo Molnar,
H. Peter Anvin, David Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
Hi Andrew,
After merging the akpm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:
In file included from arch/x86/include/asm/uaccess.h:575:0,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from include/linux/icmpv6.h:82,
from net/compat.c:19:
In function 'copy_from_user',
inlined from 'compat_sys_socketcall' at net/compat.c:793:20:
arch/x86/include/asm/uaccess_64.h:64:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct
Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
for x86_64") when built with gcc 4.6.0. This does not fail when built
with 4.5.2.
The problem here is that the length parameter to copy_from_user() is
obtained by indexing into an array of sizes. Making the array const
does not help (obviously, since the index is not known at compile time
anyway).
Maybe I need a newer compiler. For today I have gone back to my 4.5.2
compiler.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the akpm tree
2011-09-30 5:32 Stephen Rothwell
@ 2011-09-30 6:02 ` Andrew Morton
2011-10-04 7:44 ` Stephen Rothwell
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2011-09-30 6:02 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, linux-next, linux-kernel, Stephen Boyd,
Ingo Molnar, H. Peter Anvin, David Miller, netdev
On Fri, 30 Sep 2011 15:32:55 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Andrew,
>
> After merging the akpm tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> In file included from arch/x86/include/asm/uaccess.h:575:0,
> from include/net/checksum.h:25,
> from include/linux/skbuff.h:28,
> from include/linux/icmpv6.h:82,
> from net/compat.c:19:
> In function 'copy_from_user',
> inlined from 'compat_sys_socketcall' at net/compat.c:793:20:
> arch/x86/include/asm/uaccess_64.h:64:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct
>
> Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
> for x86_64") when built with gcc 4.6.0. This does not fail when built
> with 4.5.2.
This:
extern void copy_from_user_overflow(void)
#ifdef CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
__compiletime_error("copy_from_user() buffer size is not provably correct")
#else
__compiletime_warning("copy_from_user() buffer size is not provably correct")
#endif
presumably CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y, so it's doing what
we asked it to do.
> The problem here is that the length parameter to copy_from_user() is
> obtained by indexing into an array of sizes. Making the array const
> does not help (obviously, since the index is not known at compile time
> anyway).
>
> Maybe I need a newer compiler. For today I have gone back to my 4.5.2
> compiler.
That patch is a PITA. I've been waiting for some saviour to come along
and fix all the warnings it emits before proceeding with it. As I am
apparently saviourless I shall hide that patch from the mm->linux-next
drop, so only I get to suffer its effects.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the akpm tree
2011-09-30 6:02 ` Andrew Morton
@ 2011-10-04 7:44 ` Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2011-10-04 7:44 UTC (permalink / raw)
To: Andrew Morton
Cc: Andrew Morton, linux-next, linux-kernel, Stephen Boyd,
Ingo Molnar, H. Peter Anvin, David Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
Hi Andrew,
On Thu, 29 Sep 2011 23:02:26 -0700 Andrew Morton <akpm00@gmail.com> wrote:
>
> > Caused by commit 15e19cbbbf2a ("x86: implement strict user copy checks
> > for x86_64") when built with gcc 4.6.0. This does not fail when built
> > with 4.5.2.
>
> That patch is a PITA. I've been waiting for some saviour to come along
> and fix all the warnings it emits before proceeding with it. As I am
> apparently saviourless I shall hide that patch from the mm->linux-next
> drop, so only I get to suffer its effects.
OK, I have dropped that commit from linux-next.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: build failure after merge of the akpm tree
@ 2013-02-11 7:13 Stephen Rothwell
2013-02-11 12:04 ` Amir Vadai
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Rothwell @ 2013-02-11 7:13 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-next, linux-kernel, Yan Burman, Amir Vadai, David Miller,
netdev, Sasha Levin
[-- Attachment #1: Type: text/plain, Size: 7076 bytes --]
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@canb.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@canb.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@canb.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@canb.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@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the akpm tree
2013-02-11 7:13 Stephen Rothwell
@ 2013-02-11 12:04 ` Amir Vadai
0 siblings, 0 replies; 9+ messages in thread
From: Amir Vadai @ 2013-02-11 12:04 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, linux-next, linux-kernel, Yan Burman, David Miller,
netdev, Sasha Levin
On 11/02/2013 09:13, Stephen Rothwell wrote:
> 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@canb.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@canb.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();
>
Acked-By: Amir Vadai <amirv@mellanox.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* linux-next: build failure after merge of the akpm tree
@ 2013-02-20 6:28 Stephen Rothwell
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2013-02-20 6:28 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-next, linux-kernel, Shahed Shaikh, David Miller, netdev,
Rajesh Borundia, Jitendra Kalsaria
[-- Attachment #1: Type: text/plain, Size: 4450 bytes --]
Hi Andrew,
After merging the akpm tree, today's linux-next build (x86_64
allmodconfig) failed like this:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c: In function 'qlcnic_prune_lb_filters':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:607:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:607:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c:608:3: error: expected ';' before '{' token
Caused by commit c4b75b428da3 ("hlist: drop the node parameter from
iterators") interacting with commit 53643a75b147 ("qlcnic: fix ping
resumption to a VM after a live migration") from the net-next tree.
I applied this merge fix:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 20 Feb 2013 17:17:54 +1100
Subject: [PATCH] hlist-drop-the-node-parameter-from-iterators-qlnic-fix
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
index a5422cd..f89cc7a 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
@@ -604,7 +604,7 @@ void qlcnic_prune_lb_filters(struct qlcnic_adapter *adapter)
for (i = 0; i < adapter->rx_fhash.fbucket_size; i++) {
head = &(adapter->rx_fhash.fhead[i]);
- hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode)
+ hlist_for_each_entry_safe(tmp_fil, n, head, fnode)
{
time = tmp_fil->ftime;
if (jiffies > (QLCNIC_FILTER_AGE * HZ + time)) {
--
1.8.1
which then lead to these erroes:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c: In function 'qlcnic_add_lb_filter':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:3: error: 'hlist_for_each_entry_safe' undeclared (first use in this function)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:182:65: error: expected ';' before '{' token
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:208:63: error: macro "hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:208:65: error: expected ';' before '{' token
for which I applied this merge fix patch:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 20 Feb 2013 17:25:26 +1100
Subject: [PATCH] hlist-drop-the-node-parameter-from-iterators-qlnic-2-fix
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 27196ed..0e63006 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -162,7 +162,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
{
struct ethhdr *phdr = (struct ethhdr *)(skb->data);
struct qlcnic_filter *fil, *tmp_fil;
- struct hlist_node *tmp_hnode, *n;
+ struct hlist_node *n;
struct hlist_head *head;
unsigned long time;
u64 src_addr = 0;
@@ -179,7 +179,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
(adapter->fhash.fbucket_size - 1);
head = &(adapter->rx_fhash.fhead[hindex]);
- hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) {
+ hlist_for_each_entry_safe(tmp_fil, n, head, fnode) {
if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) &&
tmp_fil->vlan_id == vlan_id) {
time = tmp_fil->ftime;
@@ -205,7 +205,7 @@ void qlcnic_add_lb_filter(struct qlcnic_adapter *adapter, struct sk_buff *skb,
(adapter->fhash.fbucket_size - 1);
head = &(adapter->rx_fhash.fhead[hindex]);
spin_lock(&adapter->rx_mac_learn_lock);
- hlist_for_each_entry_safe(tmp_fil, tmp_hnode, n, head, fnode) {
+ hlist_for_each_entry_safe(tmp_fil, n, head, fnode) {
if (!memcmp(tmp_fil->faddr, &src_addr, ETH_ALEN) &&
tmp_fil->vlan_id == vlan_id) {
found = 1;
--
1.8.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread
* linux-next: build failure after merge of the akpm tree
@ 2017-06-30 6:32 Stephen Rothwell
2017-07-03 8:14 ` Stephen Rothwell
2017-07-03 8:57 ` David Miller
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Rothwell @ 2017-06-30 6:32 UTC (permalink / raw)
To: Andrew Morton, David Miller, Networking
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Daniel Micay,
Ilan Tayari, Saeed Mahameed
Hi all,
After merging the akpm tree, today's linux-next build (x86_64
allmodconfig) failed like this:
In file included from include/linux/bitmap.h:8:0,
from include/linux/cpumask.h:11,
from include/linux/mm_types_task.h:13,
from include/linux/mm_types.h:4,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from include/linux/if_ether.h:23,
from include/linux/etherdevice.h:25,
from drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:33:
In function 'memcpy',
inlined from 'mlx5_fpga_query_qp' at drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:194:2:
include/linux/string.h:315:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
__read_overflow2();
^
Caused by commit
c151149cc4db ("include/linux/string.h: add the option of fortified string.h functions")
interacting with commit
6062118d5cd2 ("net/mlx5: FPGA, Add FW commands for FPGA QPs")
from the net-next tree.
I took a guess and tried the following patch which seemed to work.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Jun 2017 16:24:35 +1000
Subject: [PATCH] net/mlx5: fix memcpy limit?
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
index 5cb855fd618f..e37453d838db 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
@@ -191,7 +191,7 @@ int mlx5_fpga_query_qp(struct mlx5_core_dev *dev,
if (ret)
return ret;
- memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, in, fpga_qpc),
+ memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, out, fpga_qpc),
MLX5_FLD_SZ_BYTES(fpga_query_qp_out, fpga_qpc));
return ret;
}
--
2.11.0
--
Cheers,
Stephen Rothwell
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the akpm tree
2017-06-30 6:32 linux-next: build failure after merge of the akpm tree Stephen Rothwell
@ 2017-07-03 8:14 ` Stephen Rothwell
2017-07-03 8:57 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: Stephen Rothwell @ 2017-07-03 8:14 UTC (permalink / raw)
To: Andrew Morton, David Miller, Networking
Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Daniel Micay,
Ilan Tayari, Saeed Mahameed
Hi all,
On Fri, 30 Jun 2017 16:32:41 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the akpm tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> In file included from include/linux/bitmap.h:8:0,
> from include/linux/cpumask.h:11,
> from include/linux/mm_types_task.h:13,
> from include/linux/mm_types.h:4,
> from include/linux/kmemcheck.h:4,
> from include/linux/skbuff.h:18,
> from include/linux/if_ether.h:23,
> from include/linux/etherdevice.h:25,
> from drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:33:
> In function 'memcpy',
> inlined from 'mlx5_fpga_query_qp' at drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c:194:2:
> include/linux/string.h:315:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
> __read_overflow2();
> ^
>
> Caused by commit
>
> c151149cc4db ("include/linux/string.h: add the option of fortified string.h functions")
>
> interacting with commit
>
> 6062118d5cd2 ("net/mlx5: FPGA, Add FW commands for FPGA QPs")
>
> from the net-next tree.
>
> I took a guess and tried the following patch which seemed to work.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 30 Jun 2017 16:24:35 +1000
> Subject: [PATCH] net/mlx5: fix memcpy limit?
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> index 5cb855fd618f..e37453d838db 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c
> @@ -191,7 +191,7 @@ int mlx5_fpga_query_qp(struct mlx5_core_dev *dev,
> if (ret)
> return ret;
>
> - memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, in, fpga_qpc),
> + memcpy(fpga_qpc, MLX5_ADDR_OF(fpga_query_qp_out, out, fpga_qpc),
> MLX5_FLD_SZ_BYTES(fpga_query_qp_out, fpga_qpc));
> return ret;
> }
> --
> 2.11.0
Again today ... so is the fix correct? if so, Dave should apply it, if
not someone should supply a correct fix for Dave.
--
Cheers,
Stephen Rothwell
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: linux-next: build failure after merge of the akpm tree
2017-06-30 6:32 linux-next: build failure after merge of the akpm tree Stephen Rothwell
2017-07-03 8:14 ` Stephen Rothwell
@ 2017-07-03 8:57 ` David Miller
1 sibling, 0 replies; 9+ messages in thread
From: David Miller @ 2017-07-03 8:57 UTC (permalink / raw)
To: sfr; +Cc: akpm, netdev, linux-next, linux-kernel, danielmicay, ilant,
saeedm
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 30 Jun 2017 16:32:41 +1000
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 30 Jun 2017 16:24:35 +1000
> Subject: [PATCH] net/mlx5: fix memcpy limit?
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-07-03 8:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30 6:32 linux-next: build failure after merge of the akpm tree Stephen Rothwell
2017-07-03 8:14 ` Stephen Rothwell
2017-07-03 8:57 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-02-20 6:28 Stephen Rothwell
2013-02-11 7:13 Stephen Rothwell
2013-02-11 12:04 ` Amir Vadai
2011-09-30 5:32 Stephen Rothwell
2011-09-30 6:02 ` Andrew Morton
2011-10-04 7:44 ` Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).