[PATCH] Eliminate witness warning in linux_ioctl.c

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Fri, 26 Aug 2005 00:35:18 -0400
Hi,

If I run the following test:

(1)  Make sure that the linux_base-8 port is installed.
(2)  kldload linux.ko
(3)  Download and run the ifconfig program from Fedora:
      http://people.freebsd.org/~rodrigc/linux-test/ifconfig.bz2

I get this following WITNESS warning (not a LOR!!):

Calling uiomove() with the following non-sleepable locks held:
exclusive sleep mutex ifnet r = 0 (0xc096dd60) locked _at_ /usr/src/sys/modules/lin
ux/../../compat/linux/linux_ioctl.c:2170
KDB: stack backtrace:
kdb_backtrace(1,c17fe900,400,d165bc50,d165bbfc) at kdb_backtrace+0x29
witness_warn(5,0,c0856813,c064b97d,0) at witness_warn+0x18e
uiomove(d165bc70,20,d165bc50,1,bfbfddb0) at uiomove+0x56
linux_ioctl_socket(c1b94000,d165bd04,c181e120,0,c1b94000) at linux_ioctl_socket+
0x7dc
linux_ioctl(c1b94000,d165bd04,3,3,246) at linux_ioctl+0x99
syscall(3b,3b,3b,b,bfbfe208) at syscall+0x22f
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (54, Linux ELF, linux_ioctl), eip = 0x283252a4, esp = 0xbfbfdd90, eb
p = 0xbfbfe1e0 ---


In order to eliminate this WITNESS warning,
I modified linux_ifconf() to not use uiomove().  I
based my changes on the logic used in ifconf() in net/if.c.

Can someone provide feedback on this patch?

Thanks.

-- 
Craig Rodrigues        
rodrigc_at_crodrigues.org

Received on Fri Aug 26 2005 - 02:35:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC