On 06-06-03 11:26 Daniel Drake wrote: > I think the point is to make sure that nobody is holding the lock before > we finish clearing up. The code is obviously inaccurate because if that > was even possible, someone could and would take it immediately after the > spin_unlock. > > There is actually even more redundancy in the clear path, see the > attached patch. When the clearing happens, the network interface is down > and our interrupts are disabled, so yes, no need for locking. Also, the > whole structure gets freed immediately after clear, so there is no point > in zeroing everything again.
Hi, I changed zd_mac_clear() in a way, that the clearing of the structure is now protected by the locks. This makes at least sense to me. This way, we will catch any races. The other question is, whether the cleaning of structures is needed. I don't think they are performance issues, give the time this functions are called. OTOH we will find dangling pointer issues. So I still believe it is worth to keep them. Regards, Uli BTW: Good luck for the english team. They will play in around an hour here in Frankfurt. Yesterday I met huge crowds of "Three Lions" wearing fans here in Frankfurt. Germany managed the first test. It is as always in the world cup: Germany doesn't play good but successful. -- Uli Kunitz _______________________________________________ Zd1211-devs mailing list - http://zd1211.ath.cx/ Unsubscribe: https://lists.sourceforge.net/lists/listinfo/zd1211-devs