-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Alexander, Alexander Sack wrote: [...] >> _at__at_ -3193,6 +3193,9 _at__at_ 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... Cheers, - -- Xin LI <delphij_at_delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkoMoJYACgkQi+vbBBjt66DULwCcCN8AjNLgQU7oiOyKeackBKar V+YAoKHA6dDJymCi8rQEsr7h8m84KoW6 =HWBp -----END PGP SIGNATURE-----Received on Thu May 14 2009 - 20:53:26 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:47 UTC