diff options
author | loos <loos@FreeBSD.org> | 2015-01-09 02:51:06 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2015-01-09 02:51:06 +0000 |
commit | 6b19132d69c731529852ee376d1e6d6e9f9cf8eb (patch) | |
tree | 37df4ccd412379eda86b1a6f2b6e545344d0b4db /lib/libc/stdlib/system.c | |
parent | 5eabc7cb6715f72586fc872eab489990b50686a3 (diff) | |
download | FreeBSD-src-6b19132d69c731529852ee376d1e6d6e9f9cf8eb.zip FreeBSD-src-6b19132d69c731529852ee376d1e6d6e9f9cf8eb.tar.gz |
MFC r273606:
Fix cpsw_detach() to not panic when called from cpsw_attach().
For an unkown reason (at moment), sometimes if_cpsw cannot read from PHY
and fails to attach calling cpsw_detach() which end up in a panic.
Fix it by doing the proper check before detach the miibus and also fix the
leak of few variables.
And to actually make it work, ether_ifattach() has to be moved to the end
of cpsw_attach() to avoid a race where calling ether_ifdetach() before
domain_init() (which will only run later on) would make it crash at
INP_INFO_RLOCK() on in_pcbpurgeif0().
Tested on: BBB (am335x)
Diffstat (limited to 'lib/libc/stdlib/system.c')
0 files changed, 0 insertions, 0 deletions