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
| ||
|
Date: Fri, 27 Dec 2013 14:48:24 +0800 From: Ding Tianhong <dingtianhong@...wei.com> To: Sathya Perla <sathya.perla@...lex.com>, Subbu Seetharaman <subbu.seetharaman@...lex.com>, Ajit Khaparde <ajit.khaparde@...lex.com>, "David S. Miller" <davem@...emloft.net>, Netdev <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: [PATCH net-next 05/20] net: benet: slight optimization of addr compare Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Sathya Perla <sathya.perla@...lex.com> Cc: Subbu Seetharaman <subbu.seetharaman@...lex.com> Cc: Ajit Khaparde <ajit.khaparde@...lex.com> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com> --- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index f67586a..b5c238a 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -287,7 +287,7 @@ static int be_mac_addr_set(struct net_device *netdev, void *p) /* The MAC change did not happen, either due to lack of privilege * or PF didn't pre-provision. */ - if (memcmp(addr->sa_data, mac, ETH_ALEN)) { + if (!ether_addr_equal(addr->sa_data, mac)) { status = -EPERM; goto err; } -- 1.8.0 -- 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