Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Feb 2005 02:58:59 -0800
From:      "Li, Qing" <qing.li@bluecoat.com>
To:        <freebsd-current@freebsd.org>
Subject:   question on lock error
Message-ID:  <00CDF9AA240E204FA6E923BD35BC643608503A1A@bcs-mail.internal.cacheflow.com>

next in thread | raw e-mail | index | archive | help

	In my file if_llatbl.c, the entry and exit of function
sysctl_dumparp is=20
	guarded with

		IFNET_RLOCK()     <<---- line 128
		...
		IFNET_RUNLOCK()

	dump_llcache is also my code.

	The modified "arp" and "ndp" commands will trigger the following
messages,
	however, the output of the new L2/L3 cache table is correct. But
later on a=20
	userland application will get EPERM error. I think this is
related to the=20
	lock error.

	Could someone who is knowledgeable in the locking scheme give me
a=20
	pointer here, please ?

	TIA

	-- Qing


Feb  1 10:02:19 heavygear kernel: --- syscall (202, FreeBSD ELF32,
__sysctl), eip =3D 0x280b8ba3, esp =3D 0xbfbfe9bc, ebp =3D 0xbfbfe9f8 =
---
Feb  1 10:02:19 heavygear kernel: sysctl_old_user() with the following
non-sleepable locks held:
Feb  1 10:02:19 heavygear kernel: exclusive sleep mutex ifnet r =3D 0
(0xc094bba0) locked @ /usr/src/sys/net/if_llatbl.c:128
Feb  1 10:02:19 heavygear kernel: KDB: stack backtrace:
Feb  1 10:02:19 heavygear kernel: kdb_backtrace(1,1,1,b0,e4b7bc04) at
kdb_backtrace+0x29
Feb  1 10:02:19 heavygear kernel: witness_warn(5,0,c0834d13) at
witness_warn+0x19a
Feb  1 10:02:19 heavygear kernel:
sysctl_old_user(e4b7bc04,e4b7b9ec,b0,b0,e4b7b9ec) at
sysctl_old_user+0x3d
Feb  1 10:02:19 heavygear kernel:
dump_llcache(c1fd842c,1c,c1fffd28,e4b7bc04,0) at dump_llcache+0x19e
Feb  1 10:02:19 heavygear kernel:
sysctl_dumparp(1c,e4b7bc04,1c0000bc,0,2) at sysctl_dumparp+0x5e
Feb  1 10:02:19 heavygear kernel:
sysctl_rtsock(c08a20c0,e4b7bc8c,4,e4b7bc04,c08a20c0) at
sysctl_rtsock+0x10a
Feb  1 10:02:19 heavygear kernel:
sysctl_root(0,e4b7bc84,6,e4b7bc04,c247e450) at sysctl_root+0x11b
Feb  1 10:02:19 heavygear kernel:
userland_sysctl(c247e450,e4b7bc84,6,804f000,bfbfea7c) at
userland_sysctl+0xf4
Feb  1 10:02:19 heavygear kernel: __sysctl(c247e450,e4b7bd14,6,1,10296)
at __sysctl+0x77
Feb  1 10:02:19 heavygear kernel: syscall(2f,2f,2f,6,bfbfea7c) at
syscall+0x213
Feb  1 10:02:19 heavygear kernel: Xint0x80_syscall() at
Xint0x80_syscall+0x1f



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00CDF9AA240E204FA6E923BD35BC643608503A1A>