K 10 svn:author V 7 rwatson K 8 svn:date V 27 2009-02-25T10:59:56.898449Z K 7 svn:log V 1962 Merge r185747, r185774, r185807, r185849, r185964, r185965, r186051, r186052 from head to stable/7; note that only the locking fixes and invariants checking are added from r185747, but not the move to an rwlock which would modify the kernel binary interface, nor the move to a non-recursible lock, which is still seeing problem reports in head. This corrects, among other things, a deadlock that may occur when processing incoming ICMP redirects. r185747: - convert radix node head lock from mutex to rwlock - make radix node head lock not recursive - fix LOR in rtexpunge - fix LOR in rtredirect Reviewed by: sam r185774: - avoid recursively locking the radix node head lock - assert that it is held if RTF_RNH_LOCKED is not passed r185807: Fix a bug introduced in r185747: rather than dereferencing an uninitialized *rt to something undefined, use the fibnum that came in as function argument. Found with: Coverity Prevent(tm) CID: 4168 r185849: fix a reported panic when adding a route and one hit here when deleting a route - pass RTF_RNH_LOCKED to rtalloc1_fib in 2 cases where the lock is held - make sure the rnh lock is held across rt_setgate and rt_getifa_fib r185964: Pass RTF_RNH_LOCKED to rtalloc1 sunce the node head is locked, this avoids a recursive lock panic on inet6 detach. Reviewed by: kmacy r185965: RTF_RNH_LOCKED needs to be passed in the flags arg not report, apologies to thompsa r186051: in6_addroute is called through rnh_addadr which is always called with the radix node head lock held exclusively. Pass RTF_RNH_LOCKED to rtalloc so that rtalloc1_fib will not try to re-acquire the lock. r186052: don't acquire lock recursively Oiginal commits to head were by kmacy, except r185964 by thompsa and r185807 by bz. A subset of this is a potential errata patch candidate. Reviewed by: bz, kmacy Tested by: Pete French