Date: Fri, 13 May 2005 15:28:46 +0200 From: Hans Petter Selasky <hselasky@c2i.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/80980: problem in "sys/i386/include/bus.h" cause random freezes Message-ID: <200505131528.46810.hselasky@c2i.net> Resent-Message-ID: <200505131330.j4DDU10h015220@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505131528.46810.hselasky>