On Aug 17, 2012, at 8:26 AM, John Baldwin wrote:

> On Friday, August 17, 2012 1:51:46 am Randall Stewart wrote:
>> Author: rrs
>> Date: Fri Aug 17 05:51:46 2012
>> New Revision: 239353
>> URL: http://svn.freebsd.org/changeset/base/239353
>> 
>> Log:
>>  Ok jhb, lets move the ifa_free() down to the bottom to
>>  assure that *all* tables and such are removed before
>>  we start to free. This won't protect the Hash in ip_input.c
>>  but in theory should protect any other uses that *do* use locks.
> 
> Eh, this is just a nop unless there is a reference counting bug.  Only the 
> last reference would free the memory if the reference count is correct, so 
> this is just adding obfuscation by moving the ifa_free() away from the 
> associated TAILQ_REMOVE().
> 
Well there is definitely a reference counting but in here somewhere then. And as
far as "obfuscation" of the code, it was not obvious to me when first looking
at the code and it should have been since I looked at this earlier. So without
a more detailed comment I think its obscure anyway ;-)

I will get SQA another INVARIANT load and see if they can recreate it for me. 
The
load they had when they first produced this was *supposed* to be INVARIANT but 
after
a bit of research on my part I find they were running the non-invariant, which 
explains
why things locked up instead of the assert triggering.. sigh.

Note that in the main FreeBSD sources however, the fact that ip_input.c does 
*not* lock
when it looks at the hash table these lines are removing from here means there 
is still a potential
for a crash. I have a fix for this that does not require the lock, when I get a 
moment
I will send it your way… you have seen part of it ;-)

R


> -- 
> John Baldwin
> 

------------------------------
Randall Stewart
803-317-4952 (cell)

_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to