From owner-freebsd-bugs@FreeBSD.ORG Fri May 13 13:30:02 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56B0316A4D0 for ; Fri, 13 May 2005 13:30:02 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07B4243D8A for ; Fri, 13 May 2005 13:30:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4DDU1F5015221 for ; Fri, 13 May 2005 13:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4DDU10h015220; Fri, 13 May 2005 13:30:01 GMT (envelope-from gnats) Resent-Date: Fri, 13 May 2005 13:30:01 GMT Resent-Message-Id: <200505131330.j4DDU10h015220@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, hselasky@c2i.net Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AF2316A4CE for ; Fri, 13 May 2005 13:28:03 +0000 (GMT) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 801D243D64 for ; Fri, 13 May 2005 13:28:02 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from mp-217-199-167.daxnet.no ([193.217.199.167] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 4.3c5) with ESMTP id 368001340 for FreeBSD-gnats-submit@freebsd.org; Fri, 13 May 2005 15:28:01 +0200 Message-Id: <200505131528.46810.hselasky@c2i.net> Date: Fri, 13 May 2005 15:28:46 +0200 From: Hans Petter Selasky To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/80980: problem in "sys/i386/include/bus.h" cause random freezes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hselasky@c2i.net List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 13:30:02 -0000 >Number: 80980 >Category: kern >Synopsis: problem in "sys/i386/include/bus.h" cause random freezes >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 13 13:30:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: HPS >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD 6.0-CURRENT FreeBSD 6.0-CURRENT #45: Mon Mar 21 15:40:17 CET 2005 root@:/usr/obj/usr/src/sys/custom i386 >Description: When using I386_BUS_SPACE_MEM, neither "bus_space_read_XXX" nor "bus_space_write_XXX" checks for length/count equal to zero. This can cause random freezes with some drivers. Actually the code is like this, just in assembly: while(--count) { I/O } which is not correct. This happens several places in "sys/i386/include/bus.h". >How-To-Repeat: bus_space_read_multi_2(t,h,0,&buf[0],0); will freeze the system ! "t","h", and "buf" must be valid though, and "t" must equal I386_BUS_SPACE_MEM. >Fix: Wrap all "__asm __volatile" statements inside: if(count != 0) { } >Release-Note: >Audit-Trail: >Unformatted: