From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 28 11:00:29 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430A3106566C for ; Tue, 28 Aug 2012 11:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 727298FC0C for ; Tue, 28 Aug 2012 11:00:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7SB06NG059367 for ; Tue, 28 Aug 2012 11:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7SB0689059365; Tue, 28 Aug 2012 11:00:06 GMT (envelope-from gnats) Date: Tue, 28 Aug 2012 11:00:06 GMT Message-Id: <201208281100.q7SB0689059365@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Glen Barber Cc: Subject: Re: kern/171137: NDIS causing PANIC X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Glen Barber List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 11:00:29 -0000 The following reply was made to PR kern/171137; it has been noted by GNATS. From: Glen Barber To: Mike Manilone Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/171137: NDIS causing PANIC Date: Tue, 28 Aug 2012 06:58:15 -0400 --JYK4vJDZwFMowpUq Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 10:00:07AM +0000, Mike Manilone wrote: > >Environment: > System: FreeBSD bsd.laptop.mike 9.1-RC1 FreeBSD 9.1-RC1 #0: Tue Aug 14 04= :25:06 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC a= md64 >=20 > >Description: > NDIS is causing a lot of panic to me. I'm using the BCM4313=20 > driver. And I *did* follow the instructions on the PC-BSD wiki. > I can't stand the stability. I'm looking forward this bug=20 > could be fixed before FreeBSD 9.1-RELEASE. > =09 > I don't know how to grab the output from the panic screen. But > I remembered that it's a page fault. (12) > >How-To-Repeat: > 1) reboot the machine, sometimes crash > 2) /etc/rc.d/netif restart, panic immediately. >=20 Hi, Can you please apply the attached patch to /usr/src/sys/compat/ndis/subr_hal.c and rebuild your kernel and report back? Regards, Glen --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ndis-race-fix.diff.txt" Content-Transfer-Encoding: quoted-printable Index: compat/ndis/subr_hal.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- compat/ndis/subr_hal.c (revision 239770) +++ compat/ndis/subr_hal.c (working copy) @@ -392,16 +392,18 @@ { uint8_t oldirql; =20 + sched_pin(); oldirql =3D KeGetCurrentIrql(); =20 /* I am so going to hell for this. */ if (oldirql > irql) - panic("IRQL_NOT_LESS_THAN"); + panic("IRQL_NOT_LESS_THAN_OR_EQUAL"); =20 - if (oldirql !=3D DISPATCH_LEVEL) { - sched_pin(); + if (oldirql !=3D DISPATCH_LEVEL)=20 mtx_lock(&disp_lock[curthread->td_oncpu]); - } + else + sched_unpin();=09 + /*printf("RAISE IRQL: %d %d\n", irql, oldirql);*/ =20 return (oldirql); --T4sUOijqQbZv57TR-- --JYK4vJDZwFMowpUq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJQPKRHAAoJEFJPDDeguUajR7MH/iYY+OHnZXsUNCkMUgDzGO4k Fw3RIfJqvmRIebOZc5wVT7zyG2ZkSRdpGtHnwyhAOjAJMBwHh/1Tg6CorOylvn6M paspIkVfHTreqHzqkuRPmSqME25cVupkFBRs+tZxgXC2L40GL+/3SZ4+e1uv+arj X6yFHfPU6nXoYROwRWeYxY2U/dBieOZWR9S0iEIv6vAiJFbR8bL/1bbRWwbuyhC0 0GuhpaJlqMB6zmuXMY/c/WQQtQMX8JF1bxHpr31yIK9NUoe6boC2lB0UywYgPpZE 7C8kqXhCqjXGY2VMmbEfb2GiHG2lYxEHGnVhlTF1M/sdFjLi2RFa459GmYVX990= =9Ntv -----END PGP SIGNATURE----- --JYK4vJDZwFMowpUq--