Broadcom bge(4) panics while shutting down

Xin LI delphij at
Thu May 14 22:53:26 UTC 2009

Hash: SHA1

Hi, Alexander,

Alexander Sack wrote:
>> @@ -3193,6 +3193,9 @@ bge_rxeof(struct bge_softc *sc)
>>                BGE_UNLOCK(sc);
>>                (*ifp->if_input)(ifp, m);
>>                BGE_LOCK(sc);
>> +
>> +               if (!(ifp->if_drv_flags & IFF_DRV_RUNNING))
>> +                       return;
>>        }
> Xin this looks fine by me, I actually put this up in the while loop as
> I mentioned before which I think is functionality equivalent (can you
> gain some optimizations by putting in the while loop though compiler
> wise than a separate compilation unit?).

I think the two is not semantically the same...  For this case an
explicit 'return' would mean that no further actions, say the things
right after the while loop, would be taken.  In my opinion that this is
better since there is no protection over these DMA maps (which could
have been released elsewhere).

Note that I'm still not quite confident about the logic, we might just
narrowed but not closed the race completely - these
BGE_LOCK()/UNLOCK()'s could hit some problem if one thread has done
bge_stop() very quickly.  That would require more work, though, I don't
have a very good plan at this moment...

- --
Xin LI <delphij at>
FreeBSD - The Power to Serve!
Version: GnuPG v2.0.11 (FreeBSD)


More information about the freebsd-current mailing list