cvs commit: src/sys/dev/re if_re.c
John Baldwin
jhb at FreeBSD.org
Thu Sep 15 12:22:06 PDT 2005
On Thursday 15 September 2005 02:59 pm, Ruslan Ermilov wrote:
> ru 2005-09-15 18:59:34 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/dev/re if_re.c
> Log:
> re_detach() fixes:
>
> - Fixed if_free() logic screw-up that can either result
> in freeing a NULL pointer or leaking "struct ifnet".
> - Move if_free() after re_stop(); the latter accesses
> "struct ifnet". This bug was masked by a previous bug.
> - Restore the fix for a panic on detach caused by racing
> with BPF detach code by Bill by moving ether_ifdetach()
> after re_stop() and resetting IFF_UP; this got screwed
> up in revs. 1.30 and 1.36.
Device drivers should not modify IFF_UP. Instead, the interrupt handler
should be checking IFF_DRV_RUNNING rather than IFF_UP (foo_stop() clears
IFF_DRV_RUNNING).
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list