From owner-freebsd-emulation@FreeBSD.ORG Wed Mar 23 21:33:40 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98AB716A4CF for ; Wed, 23 Mar 2005 21:33:40 +0000 (GMT) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C2BC43D49 for ; Wed, 23 Mar 2005 21:33:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 22156 invoked from network); 23 Mar 2005 21:33:40 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 23 Mar 2005 21:33:38 -0000 Received: from [10.50.41.231] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j2NLXUff064052; Wed, 23 Mar 2005 16:33:31 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Wed, 23 Mar 2005 15:46:40 -0500 User-Agent: KMail/1.6.2 References: <20050302020453.GE55745@squash.dsto.defence.gov.au> In-Reply-To: <20050302020453.GE55745@squash.dsto.defence.gov.au> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503231546.40408.jhb@FreeBSD.org> X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: emulation@FreeBSD.org cc: matthew.thyer@dsto.defence.gov.au cc: "Wilkinson, Alex" Subject: Re: sys/modules/linux/linux_ioctl.o - LOR [I think] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2005 21:33:40 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org