]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/ethernet/ti/davinci_emac.c
davinci_emac: fix kernel oops when changing MAC address while interface is down
authorPablo Bitton <pablo.bitton@gmail.com>
Wed, 8 Jul 2009 02:11:10 +0000 (19:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Jul 2009 17:46:44 +0000 (10:46 -0700)
commit64c8165b44a91c09b19afb4110610ed242286639
treeb7e4754f6280248b5444d4ff908c29684307ca11
parent19e588e7d156cc4415585edd8c27c3075f62eaf8
davinci_emac: fix kernel oops when changing MAC address while interface is down

Check that network interface is running before changing its MAC address.
Otherwise, rxch is accessed when it's NULL - causing a kernel oops.
Moreover, check that the new MAC address is valid.

Signed-off-by: Pablo Bitton <pablo.bitton@gmail.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Tested-by: Chaithrika U S <chaithrika@ti.com>
[tested on DM6467 EVM]
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/davinci_emac.c