LORs in RELENG_7

Ulrich Spoerlein uspoerlein at gmail.com
Fri Nov 21 09:47:42 PST 2008


On Thu, 20.11.2008 at 17:56:07 -0500, Michael Proto wrote:
> On Thu, Nov 20, 2008 at 4:11 PM, Ulrich Spoerlein <uspoerlein at gmail.com>wrote:
> > Hi,
> >
> > I'm running my RELENG_7 kernel with WITNESS and there's always a LOR
> > when pf(4) is enabled:
> >
> > lock order reversal:
> >  1st 0xc09ca828 ifnet (ifnet) @ /usr/src/sys/net/if.c:849
> >  2nd 0xc45d604c pf task mtx (pf task mtx) @
> > /usr/src/sys/modules/pf/../../contrib/pf/net/pf_if.c:916
> > KDB: stack backtrace:
> > db_trace_self_wrapper(c08df797,fb671764,c0630e8e,c08e1c96,c45d604c,...) at
> > db_trace_self_wrapper+0x26
> > kdb_backtrace(c08e1c96,c45d604c,c45d3b1c,c45d3b1c,c45d379e,...) at
> > kdb_backtrace+0x29
> > witness_checkorder(c45d604c,9,c45d379e,394,c08e9058,...) at
> > witness_checkorder+0x6de
> > _mtx_lock_flags(c45d604c,0,c45d379e,394,fb6717dc,...) at
> > _mtx_lock_flags+0xbc
> > pfi_attach_group_event(0,c4450000,c08e9058,374,c44a920c,...) at
> > pfi_attach_group_event+0x4e
> > if_addgroup(c441c000,c08f70d6,4,0,0,...) at if_addgroup+0x2c7
> > if_clone_createif(0,0,c08e9563,87,0,...) at if_clone_createif+0x81
> > if_clone_create(fb671943,4,0,44,180,...) at if_clone_create+0x8c
> > tunclone(0,c461e400,fb671943,4,fb67195c,...) at tunclone+0x17a
> > devfs_lookup(fb6719d0,fb6719d0,fb671b7c,c418de04,2,...) at
> > devfs_lookup+0x50e
> > VOP_LOOKUP_APV(c0928f40,fb6719d0,c412f230,c08e77ef,2a9,...) at
> > VOP_LOOKUP_APV+0xa5
> > lookup(fb671b7c,c08e77ef,c6,bf,c461e92c,...) at lookup+0x58e
> > namei(fb671b7c,c412f230,fb671a74,246,c0983774,...) at namei+0x34b
> > vn_open_cred(fb671b7c,fb671c78,ce8,c461e400,c4460558,...) at
> > vn_open_cred+0x2c9
> > vn_open(fb671b7c,fb671c78,ce8,c4460558,c05e807d,...) at vn_open+0x33
> > kern_open(c412f230,80a0f18,0,3,808ecfa,...) at kern_open+0xe7
> > open(c412f230,fb671cfc,c,c08e28c3,c092c0b8,...) at open+0x30
> > syscall(fb671d38) at syscall+0x2b3
> > Xint0x80_syscall() at Xint0x80_syscall+0x20
> > --- syscall (5, FreeBSD ELF32, open), eip = 0x2835a65b, esp = 0xbfbfeafc,
> > ebp = 0xbfbfeb38 ---
> >
> >
> Are you using user or group rules in your pf.conf? IIRC there is still a
> known LOR in the socket layer with rules using the user or group filters.

No, I'm aware of the problems with pf(4) and user/group rules. This LOR
is in combination with rules on tun(4) devices, as you can see from the
backtrace. I wonder what tunclone() is doing in there, though.

Cheers,
Ulrich Spoerlein
-- 
It is better to remain silent and be thought a fool,
than to speak, and remove all doubt.


More information about the freebsd-stable mailing list