Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2005 15:46:40 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Cc:        "Wilkinson, Alex" <alex.wilkinson@dsto.defence.gov.au>
Subject:   Re: sys/modules/linux/linux_ioctl.o - LOR [I think]
Message-ID:  <200503231546.40408.jhb@FreeBSD.org>
In-Reply-To: <20050302020453.GE55745@squash.dsto.defence.gov.au>
References:  <20050302020453.GE55745@squash.dsto.defence.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 01 March 2005 09:04 pm, Wilkinson, Alex wrote:
> Version: FreeBSD 6.0-CURRENT #1: Tue Feb 22 12:47:37 CST 2005
>
> Seeing these error on console:
>
>   --- syscall (54, Linux ELF, linux_ioctl), eip = 0x283bf2a4, esp =
> 0xbfbf8ed0, ebp = 0xbfbf8f80 --- Calling uiomove() with the following
> non-sleepable locks held:
>    exclusive sleep mutex ifnet r = 0 (0xc09b8ea0) locked @
> /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:2135 KDB: stack
> backtrace:
>    witness_warn(2,0,c08a71b8,ec80fbec,0) at witness_warn+0x175
>    uiomove(ec80fc64,20,ec80fc44,0,1) at uiomove+0x4d
>    linux_ioctl_socket(c6b52000,ec80fd14,ec80fcd0,c08aa46e,68d) at
> linux_ioctl_socket+0x8f4 linux_ioctl(c6b52000,ec80fd14,c08c8f72,3ad,3) at
> linux_ioctl+0x69 syscall(2f,2f,2f,bfbfd36c,4) at syscall+0x13b
>    Xint0x80_syscall() at Xint0x80_syscall+0x1f
>    --- syscall (54, Linux ELF, linux_ioctl), eip = 0x283bf2a4, esp =
> 0xbfbfd290, ebp = 0xbfbfd300 --- Calling uiomove() with the following
> non-sleepable locks held:
>    exclusive sleep mutex ifnet r = 0 (0xc09b8ea0) locked @
> /usr/src/sys/modules/linux/../../compat/linux/linux_ioctl.c:2135 KDB: stack
> backtrace:
>    witness_warn(2,0,c08a71b8,0,0) at witness_warn+0x175
>    uiomove(ec80fc64,20,ec80fc44,0,1) at uiomove+0x4d
>    linux_ioctl_socket(c6b52000,ec80fd14,ec80fcd0,c08aa46e,68d) at
>    linux_ioctl_socket+0x8f4
>    linux_ioctl(c6b52000,ec80fd14,c08c8f72,3ad,3) at linux_ioctl+0x69
>    syscall(2f,2f,2f,bfbfd36c,4) at syscall+0x13b
>    Xint0x80_syscall() at Xint0x80_syscall+0x1f
>    --- syscall (54, Linux ELF, linux_ioctl), eip = 0x283bf2a4, esp =
> 0xbfbfd290, ebp = 0xbfbfd300 ---

Definitely a bug.  The linux_ioctl() code needs to unlock the ifnet lock 
before it calls uiomove() unless it knows for certain that it is talking to 
UIO_SYSSPACE.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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