[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101206130059.GA19448@joejin-pc.cn.oracle.com>
Date: Mon, 6 Dec 2010 21:00:59 +0800
From: Joe Jin <joe.jin@...cle.com>
To: sathyap@...verengines.com, subbus@...verengines.com,
sarveshwarb@...verengines.com, ajitk@...verengines.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
greg.marsden@...cle.com, guru.anbalagane@...cle.com,
joe.jin@...cle.com
Subject: [patch 1/1] driver/net/benet: fix be_cmd_multicast_set() memcpy bug
Hi,
Regarding benet be_cmd_multicast_set() function, now using
netdev_for_each_mc_addr() helper for mac address copy, but
when copying to req->mac[] did not increase of the index.
Cc: Sathya Perla <sathyap@...verengines.com>
Cc: Subbu Seetharaman <subbus@...verengines.com>
Cc: Sarveshwar Bandi <sarveshwarb@...verengines.com>
Cc: Ajit Khaparde <ajitk@...verengines.com>
Signed-off-by: Joe Jin <joe.jin@...cle.com>
---
be_cmds.c | 2 +-
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 36eca1c..e4465d2 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1235,7 +1235,7 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
i = 0;
netdev_for_each_mc_addr(ha, netdev)
- memcpy(req->mac[i].byte, ha->addr, ETH_ALEN);
+ memcpy(req->mac[i++].byte, ha->addr, ETH_ALEN);
} else {
req->promiscuous = 1;
}
--
Oracle <http://www.oracle.com>
Joe Jin | Team Leader, Software Development | +8610.8278.6295
ORACLE | Linux and Virtualization
Incubator Building 2-A ZPark | Beijing China, 100094
--
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