projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64f1660
)
mv643xx_eth: check for valid hw address (resubmit)
author
Denis Kirjanov
<kirjanov@gmail.com>
Wed, 9 Dec 2009 04:36:00 +0000
(20:36 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 9 Dec 2009 04:36:00 +0000
(20:36 -0800)
Check for valid hw address.
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mv643xx_eth.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/mv643xx_eth.c
b/drivers/net/mv643xx_eth.c
index 796a493f95aba719fd0e67bc9b4c6ab7dd6063e8..1405a170bb43483046b1d6f6be4542c2a7021e23 100644
(file)
--- a/
drivers/net/mv643xx_eth.c
+++ b/
drivers/net/mv643xx_eth.c
@@
-1827,6
+1827,9
@@
static int mv643xx_eth_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr *sa = addr;
+ if (!is_valid_ether_addr(sa->sa_data))
+ return -EINVAL;
+
memcpy(dev->dev_addr, sa->sa_data, ETH_ALEN);
netif_addr_lock_bh(dev);