kern/63772: tap device / exclusive open problem

Stefan `Sec` Zehl sec at 42.org
Mon Mar 8 16:46:46 PST 2004


On Fri, Mar 05, 2004 at 10:55 -0800, Brooks Davis wrote:

[...]

> >         KASSERT(!(tp->tap_flags & TAP_OPEN), 
> >                 ("%s flags is out of sync", tp->tap_if.if_xname));
> >  
> > +       if (tp->tap_flags & TAP_OPEN)
> > +               return (EBUSY);
> > +
[...]


> There's obviously something complicated going on since with INVARIANTS
> enabled this would either return EBUSY or panic.  This should definitely
> not be committed as is.

I must admit, I don't understand the problem. this is an really simple
if. Nothing is modified, and tp is not NULL, or the KASSERT above would
be broken already.

How do you get it to panic?

It works fine for me.

CU,
    Sec
-- 
In 1968 it took the computing-Power of 2 C-64 to fly a rocket to the moon.
Now, 1997 it takes the Power of a Pentium 133 to run Microsoft Windows 95.
                    Something must have gone wrong.


More information about the freebsd-bugs mailing list