IP22: don't let kernel oops when eaddr is unset
Subsystems (2)
PATCH 1/1 IP22: don't let kernel oops when eaddr is unset
Hi,
ArcGetenvironment returns NULL if "eaddr" is unset which lets the following str2eaddr die.
-- Guido
Index: drivers/net/sgiseeq.c
===================================================================
RCS file: /home/cvs/linux/drivers/net/sgiseeq.c,v
retrieving revision 1.31
net/sgiseeq.c +4 -0
@@ -718,6 +718,10 @@* On MIPS64 it crashes for some other, yet unknown reason ... */ ep =ArcGetEnvironmentVariable ("eaddr" ); +if (ep ==NULL ) { +printk (KERN_INFO "Seeq8003: Can't get MAC address!\n" ); +return -ENODEV ; + }str2eaddr (onboard_eth_addr, ep); return sgiseeq_init(dev, (struct sgiseeq_regs *) (KSEG1ADDR(0x1fbd4000)),