diff options
author | Brian Feldman <green@FreeBSD.org> | 2002-03-05 17:50:35 +0000 |
---|---|---|
committer | Brian Feldman <green@FreeBSD.org> | 2002-03-05 17:50:35 +0000 |
commit | 0346e9733a9927734bb5f07c723a02c7427af521 (patch) | |
tree | 0e04a8e9f88793f76625302803b12928d3d8a217 /sys | |
parent | 04858e7ee40f86dcf42c8d299abeed3e3883d2ae (diff) | |
download | src-0346e9733a9927734bb5f07c723a02c7427af521.tar.gz src-0346e9733a9927734bb5f07c723a02c7427af521.zip |
Use revoke_and_destroy_dev() instead of destroy_dev() when removing /dev/net
pseudo-devices when an interface goes away. Otherwise, an open /dev/net/foo0
when the interface is removed can cause a crash.
Not objected to by: jlemon
Notes
Notes:
svn path=/head/; revision=91699
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 3cbf56df8139..fe1f7f7485e5 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -462,7 +462,7 @@ if_detach(ifp) * Clean up all addresses. */ ifaddr_byindex(ifp->if_index) = NULL; - destroy_dev(ifdev_byindex(ifp->if_index)); + revoke_and_destroy_dev(ifdev_byindex(ifp->if_index)); ifdev_byindex(ifp->if_index) = NULL; while (if_index > 0 && ifaddr_byindex(if_index) == NULL) |