cvs commit: src/sys/net if.c

Peter Grehan grehan at freebsd.org
Wed Oct 22 21:08:44 PDT 2003


>   Modified files:
>     sys/net              if.c
>   Log:
>   protect by IFNET_RLOCK.
> 
>   Revision  Changes    Path
>   1.169     +2 -0      src/sys/net/if.c

 This causes a witness warning:

>malloc() of "16" with the following non-sleepable locks held:
>exclusive sleep mutex ifnet r = 0 (0x418ac8) locked @ /mnt/home/freebsd/src/sys/net/if.c:463
>Welcome to Debugger, witness_warn
>db> t
>0x003aae50: at witness_warn+0x238
>0x003aaf00: at uma_zalloc_arg+0xcc
>0x003aaf30: at malloc+0xfc
>0x003aaf60: at in6_domifattach+0x2c
>0x003aaf90: at if_attachdomain1+0x58
>0x003aafb0: at if_attachdomain+0x40
>0x003aafd0: at mi_startup+0x128

 in6_domifattach() mallocs with WAITOK, so I think these calls should be changed
to use M_NOWAIT, or an alternative ifnet list locking strategy used.

later,

Peter.


More information about the cvs-src mailing list