Broadcom bge(4) panics while shutting down
delphij at delphij.net
Thu May 14 22:53:26 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Alexander Sack wrote:
>> @@ -3193,6 +3193,9 @@ bge_rxeof(struct bge_softc *sc)
>> (*ifp->if_input)(ifp, m);
>> + 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 delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
-----END PGP SIGNATURE-----
More information about the freebsd-current